]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_ct: Offload connections with commit action
authorPaul Blakey <paulb@nvidia.com>
Wed, 26 May 2021 11:44:09 +0000 (14:44 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 May 2021 21:54:14 +0000 (14:54 -0700)
commit0cc254e5aa37cf05f65bcdcdc0ac5c58010feb33
treed83551b6230c4f7e92276c09ff1533c43903eb01
parentb28d8f0c25a9b0355116cace5f53ea52bd4020c8
net/sched: act_ct: Offload connections with commit action

Currently established connections are not offloaded if the filter has a
"ct commit" action. This behavior will not offload connections of the
following scenario:

$ tc_filter add dev $DEV ingress protocol ip prio 1 flower \
  ct_state -trk \
  action ct commit action goto chain 1

$ tc_filter add dev $DEV ingress protocol ip chain 1 prio 1 flower \
  action mirred egress redirect dev $DEV2

$ tc_filter add dev $DEV2 ingress protocol ip prio 1 flower \
  action ct commit action goto chain 1

$ tc_filter add dev $DEV2 ingress protocol ip prio 1 chain 1 flower \
  ct_state +trk+est \
  action mirred egress redirect dev $DEV

Offload established connections, regardless of the commit flag.

Fixes: 46475bb20f4b ("net/sched: act_ct: Software offload of established flows")
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Link: https://lore.kernel.org/r/1622029449-27060-1-git-send-email-paulb@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/act_ct.c