diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-03 13:23:03 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:53:31 +0100 |
commit | c09d0d0f6085944a7b0e58434148702b2d5f5e9a (patch) | |
tree | e15fa3f4ce3f9833ca6f79fda56d0b8f6f54f745 /test/perf/pasta_udp | |
parent | dcf5c0eb1e877f1de84c94bb07c30d109cb85b70 (diff) | |
download | passt-c09d0d0f6085944a7b0e58434148702b2d5f5e9a.tar passt-c09d0d0f6085944a7b0e58434148702b2d5f5e9a.tar.gz passt-c09d0d0f6085944a7b0e58434148702b2d5f5e9a.tar.bz2 passt-c09d0d0f6085944a7b0e58434148702b2d5f5e9a.tar.lz passt-c09d0d0f6085944a7b0e58434148702b2d5f5e9a.tar.xz passt-c09d0d0f6085944a7b0e58434148702b2d5f5e9a.tar.zst passt-c09d0d0f6085944a7b0e58434148702b2d5f5e9a.zip |
port_fwd: Simplify get_bound_ports_*() to port_fwd_scan_*()
get_bound_ports_*() now only use their context and ns parameters to
determine which forwarding maps they're operating on. Each function needs
the map they're actually updating, as well as the map for the other
direction, to avoid creating forwarding loops. The UDP function also
requires the corresponding TCP map, to implement the behaviour where we
forward UDP ports of the same number as bound TCP ports for tools like
iperf3.
Passing those maps directly as parameters simplifies the code without
making the callers life harder, because those already know the relevant
maps. IMO, invoking these functions in terms of where they're looking for
updated forwarding also makes more logical sense than in terms of where
they're looking for bound ports. Given that new way of looking at the
functions, also rename them to port_fwd_scan_*().
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/perf/pasta_udp')
0 files changed, 0 insertions, 0 deletions