]> www.infradead.org Git - users/willy/pagecache.git/commit
openvswitch: switch to per-action label counting in conntrack
authorXin Long <lucien.xin@gmail.com>
Mon, 12 Aug 2024 17:17:53 +0000 (13:17 -0400)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 Aug 2024 02:05:19 +0000 (19:05 -0700)
commitfcb1aa5163b1ae4cf2864b688b08927aac51f51e
treebd1a7a743d27cdb15909aced333994dd2bbf0ca9
parente5efc2311cc437e2b565d164a3de884fa33f13e9
openvswitch: switch to per-action label counting in conntrack

Similar to commit 70f06c115bcc ("sched: act_ct: switch to per-action
label counting"), we should also switch to per-action label counting
in openvswitch conntrack, as Florian suggested.

The difference is that nf_connlabels_get() is called unconditionally
when creating an ct action in ovs_ct_copy_action(). As with these
flows:

  table=0,ip,actions=ct(commit,table=1)
  table=1,ip,actions=ct(commit,exec(set_field:0xac->ct_label),table=2)

it needs to make sure the label ext is created in the 1st flow before
the ct is committed in ovs_ct_commit(). Otherwise, the warning in
nf_ct_ext_add() when creating the label ext in the 2nd flow will
be triggered:

   WARN_ON(nf_ct_is_confirmed(ct));

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Acked-by: Florian Westphal <fw@strlen.de>
Link: https://patch.msgid.link/6b9347d5c1a0b364e88d900b29a616c3f8e5b1ca.1723483073.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/openvswitch/conntrack.c
net/openvswitch/datapath.h