• Xin Long's avatar
    net: sched: allow flower to match vxlan options · d8f9dfae
    Xin Long authored
    This patch is to allow matching gbp option in vxlan.
    
    The options can be described in the form GBP/GBP_MASK,
    where GBP is represented as a 32bit hexadecimal value.
    Different from geneve, only one option can be set. And
    also, geneve options and vxlan options can't be set at
    the same time.
    
      # ip link add name vxlan0 type vxlan dstport 0 external
      # tc qdisc add dev vxlan0 ingress
      # tc filter add dev vxlan0 protocol ip parent ffff: \
          flower \
            enc_src_ip 10.0.99.192 \
            enc_dst_ip 10.0.99.193 \
            enc_key_id 11 \
            vxlan_opts 01020304/ffffffff \
            ip_proto udp \
            action mirred egress redirect dev eth0
    
    v1->v2:
      - add .strict_start_type for enc_opts_policy as Jakub noticed.
      - use Duplicate instead of Wrong in err msg for extack as Jakub
        suggested.
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d8f9dfae
cls_flower.c 75.9 KB