Centos-kernel-stream-9/include/net/tc_act
Xin Long 82c16146c7 net: sched: do not offload flows with a helper in act_ct
JIRA: https://issues.redhat.com/browse/RHEL-14095
Tested: reproducer from changelog

commit 7cd5af0e937a197295f3aa3721031f0fbae49cff
Author: Xin Long <lucien.xin@gmail.com>
Date:   Mon Nov 13 12:53:28 2023 -0500

    net: sched: do not offload flows with a helper in act_ct

    There is no hardware supporting ct helper offload. However, prior to this
    patch, a flower filter with a helper in the ct action can be successfully
    set into the HW, for example (eth1 is a bnxt NIC):

      # tc qdisc add dev eth1 ingress_block 22 ingress
      # tc filter add block 22 proto ip flower skip_sw ip_proto tcp \
        dst_port 21 ct_state -trk action ct helper ipv4-tcp-ftp
      # tc filter show dev eth1 ingress

        filter block 22 protocol ip pref 49152 flower chain 0 handle 0x1
          eth_type ipv4
          ip_proto tcp
          dst_port 21
          ct_state -trk
          skip_sw
          in_hw in_hw_count 1   <----
            action order 1: ct zone 0 helper ipv4-tcp-ftp pipe
             index 2 ref 1 bind 1
            used_hw_stats delayed

    This might cause the flower filter not to work as expected in the HW.

    This patch avoids this problem by simply returning -EOPNOTSUPP in
    tcf_ct_offload_act_setup() to not allow to offload flows with a helper
    in act_ct.

    Fixes: a21b06e73191 ("net: sched: add helper support in act_ct")
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
    Link: https://lore.kernel.org/r/f8685ec7702c4a448a1371a8b34b43217b583b9d.1699898008.git.lucien.xin@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Xin Long <lxin@redhat.com>
2023-11-18 21:30:56 -05:00
..
tc_bpf.h
tc_connmark.h net/sched: act_connmark: transition to percpu stats and rcu 2023-05-10 20:48:54 +02:00
tc_csum.h
tc_ct.h net: sched: do not offload flows with a helper in act_ct 2023-11-18 21:30:56 -05:00
tc_ctinfo.h
tc_defact.h
tc_gact.h net/sched: act_gact: Add extack messages for offload failure 2022-11-13 16:59:00 +01:00
tc_gate.h flow_offload: add index to flow_action_entry structure 2022-06-06 16:31:16 +02:00
tc_ife.h
tc_ipt.h
tc_mirred.h net: sched: act_mirred: add net device refcount tracker 2022-06-13 18:38:39 +02:00
tc_mpls.h
tc_nat.h net/sched: act_nat: transition to percpu stats and rcu 2023-05-10 20:48:54 +02:00
tc_pedit.h net/sched: transition act_pedit to rcu and percpu stats 2023-05-10 20:48:50 +02:00
tc_police.h net: flow_offload: add tc police action parameters 2022-06-06 16:32:01 +02:00
tc_sample.h
tc_skbedit.h act_skbedit: skbedit queue mapping for receive queue 2023-03-22 17:51:42 +01:00
tc_skbmod.h
tc_tunnel_key.h
tc_vlan.h net/sched: fix incorrect vlan_push_eth dest field 2022-06-06 16:32:39 +02:00