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/[email protected]/ [Aaron resolved a conflict in conntrack.c due to missing commit 501f665 ("conntrack: Extract l4 information for SCTP.")] Reported-by: Michael Plato <[email protected]> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2022-September/052065.html Signed-off-by: Peng He <[email protected]> Co-authored-by: Paolo Valerio <[email protected]> Signed-off-by: Paolo Valerio <[email protected]> Tested-by: Frode Nordahl <[email protected]> Acked-by: Ilya Maximets <[email protected]> Acked-by: Aaron Conole <[email protected]> Signed-off-by: Aaron Conole <[email protected]>
- Loading branch information