[SRU][F:linux-bluefield][PATCH v1 0/1] net: sched: allow flower to match erspan options

Tony Duan yifeid at nvidia.com
Fri Apr 7 10:46:22 UTC 2023


SRU Justification:

[Impact]

* This patch is allowing flower to match erspan option to avoid "ovs" compile error when it supports erspan.

[Fix]

* cherry-pick 79b1011cb33d166f531a1347a17e6602954e4eb1 79b1011cb33d net: sched: allow flower to match erspan options

[Test Plan]

* The options can be described in the form:
  VER:INDEX:DIR:HWID/VER:INDEX_MASK:DIR_MASK:HWID_MASK.
  When ver is set to 1, index will be applied while dir and hwid will be ignored, and when ver is set to 2, dir and hwid will be used while index will be ignored. Different from geneve, only one option can be set. And also, geneve options, vxlan options or erspan options can't be set at the same time.
  Here's an example:
      # ip link add name erspan1 type erspan external
      # tc qdisc add dev erspan1 ingress
      # tc filter add dev erspan1 protocol ip parent ffff: \
          flower \
            enc_src_ip 10.0.99.192 \
            enc_dst_ip 10.0.99.193 \
            enc_key_id 11 \
            erspan_opts 1:12:0:0/1:ffff:0:0 \
            ip_proto udp \
            action mirred egress redirect dev eth0
  Check the action is correcttly filtered

[Where problems could occur]

* When ovs supports erspan option, the compile ovs will fail.

[Other Info]

* nothing

Xin Long (1):
  net: sched: allow flower to match erspan options

 include/uapi/linux/pkt_cls.h |  16 ++++
 net/sched/cls_flower.c       | 145 +++++++++++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)

-- 
2.25.1




More information about the kernel-team mailing list