aboutgitcodebugslistschat
path: root/test/perf
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-30 15:13:09 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-12-06 07:41:42 +0100
commit7610034fefcfbac4665756ef856d69a1780c80e7 (patch)
treef76e44c7166284180378b3e22027534f7b58ff28 /test/perf
parent27bfebb0619d0b9c706bf235d4de935f9833110c (diff)
downloadpasst-7610034fefcfbac4665756ef856d69a1780c80e7.tar
passt-7610034fefcfbac4665756ef856d69a1780c80e7.tar.gz
passt-7610034fefcfbac4665756ef856d69a1780c80e7.tar.bz2
passt-7610034fefcfbac4665756ef856d69a1780c80e7.tar.lz
passt-7610034fefcfbac4665756ef856d69a1780c80e7.tar.xz
passt-7610034fefcfbac4665756ef856d69a1780c80e7.tar.zst
passt-7610034fefcfbac4665756ef856d69a1780c80e7.zip
udp: Don't explicitly track originating socket for spliced "connections"
When we look up udp_splice_to_ns[][].orig_sock in udp_sock_handler_splice() we're finding the socket on which the originating packet for the "connection" was received on. However, we don't specifically need this socket to be the originating one - we just need one that's bound to the the source port of this reply packet in the init namespace. We can look this up in udp_splice_to_init[v6][src].target_sock, whose defining characteristic is exactly that. The same applies with init and ns swapped. In practice, of course, the port we locate this way will always be the originating port, since we couldn't have started this "connection" if it wasn't. Change this, and we no longer need the @orig_sock field at all. That leaves just @target_sock which we rename to simply @sock. The whole udp_splice_flow structure now more represents a single bound port than a "flow" per se, so rename and recomment it accordingly. Likewise the udp_splice_to_{ns,init} names are now misleading, since the ports in those maps are used in both directions. Rename them to udp_splice_{ns,init} indicating the location where the described socket is bound. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/perf')
0 files changed, 0 insertions, 0 deletions