Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conntrack: Remove nat_conn introducing key directionality.
The patch avoids the extra allocation for nat_conn. Currently, when doing NAT, the userspace conntrack will use an extra conn for the two directions in a flow. However, each conn has actually the two keys for both orig and rev directions. This patch introduces a key_node[CT_DIRS] member as per Aaron's suggestion in the conn which consists of a key, direction, and a cmap_node for hash lookup so addressing the feedback received by the original patch [0]. With this adjustment, we also remove the assertion that connections in the table are DEFAULT while updating connection state and/or removing connections. [0] https://patchwork.ozlabs.org/project/openvswitch/patch/20201129033255.64647-2-hepeng.0320@bytedance.com/ [Aaron resolved 2 conflicts in conntrack.c due to missing commits 501f665 ("conntrack: Extract l4 information for SCTP.") a3848d9 ("conntrack: Show parent key if present.")] Reported-by: Michael Plato <michael.plato@tu-berlin.de> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2022-September/052065.html Signed-off-by: Peng He <hepeng.0320@bytedance.com> Co-authored-by: Paolo Valerio <pvalerio@redhat.com> Signed-off-by: Paolo Valerio <pvalerio@redhat.com> Tested-by: Frode Nordahl <frode.nordahl@canonical.com> Acked-by: Ilya Maximets <i.maximets@ovn.org> Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Aaron Conole <aconole@redhat.com>
- Loading branch information