diff options
author | Frode Nordahl <frode.nordahl@canonical.com> | 2022-05-30 21:07:19 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-06-07 15:49:26 +0200 |
commit | 88e3ae5d6f7370acbf1d9d60c1a06e4132e4e532 (patch) | |
tree | 45f5278898c8c5c3d67704dd5b8ec27b2b71ccd9 /ofproto | |
parent | ca44218515f02d7421e4b228e0a3b6ee2cefffcf (diff) | |
download | openvswitch-88e3ae5d6f7370acbf1d9d60c1a06e4132e4e532.tar.gz |
ofproto-dpif-xlate: Fix internal CT state for non-recirc traffic.
In some circumstances a flow may get its ct_state set without
conscious intervention by the OVS user space code.
Commit 355fef6f2ccbc optimizes out unnecessary ct_clear actions
based on an internal struct xlate_ctx->conntracked state flag.
Before this commit the xlate_ctx->conntracked state flag would
be initialized to 'false' and only set during thawing for
recirculation.
This patch checks the flow ct_state for the non-recirc case and
sets the internal conntracked state appropriately. A system
traffic test is also added to avoid regression.
Fixes: 355fef6f2ccbc ("ofproto-dpif-xlate: Avoid successive ct_clear datapath actions.")
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto-dpif-xlate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 9ea21edc4..7716c22f4 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -7828,6 +7828,12 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout) goto exit; } + if (!xin->frozen_state + && xin->flow.ct_state + && xin->flow.ct_state & CS_TRACKED) { + ctx.conntracked = true; + } + /* Tunnel metadata in udpif format must be normalized before translation. */ if (flow->tunnel.flags & FLOW_TNL_F_UDPIF) { const struct tun_table *tun_tab = ofproto_get_tun_tab( |