aboutgitcodebugslistschat
path: root/tcp_splice.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-17 16:59:08 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-11-25 01:36:04 +0100
commit8e914238b6def7abc61d97482dd618cfc3a061bd (patch)
tree35384c0207fab32db5d5c084db49d73ace911751 /tcp_splice.c
parent8033a8e889ef5893aeab156fd9a60cd4d5722e48 (diff)
downloadpasst-8e914238b6def7abc61d97482dd618cfc3a061bd.tar
passt-8e914238b6def7abc61d97482dd618cfc3a061bd.tar.gz
passt-8e914238b6def7abc61d97482dd618cfc3a061bd.tar.bz2
passt-8e914238b6def7abc61d97482dd618cfc3a061bd.tar.lz
passt-8e914238b6def7abc61d97482dd618cfc3a061bd.tar.xz
passt-8e914238b6def7abc61d97482dd618cfc3a061bd.tar.zst
passt-8e914238b6def7abc61d97482dd618cfc3a061bd.zip
tcp: Use dual stack sockets for port forwarding when possible
Platforms like Linux allow IPv6 sockets to listen for IPv4 connections as well as native IPv6 connections. By doing this we halve the number of listening sockets we need for TCP (assuming passt/pasta is listening on the same ports for IPv4 and IPv6). When forwarding many ports (e.g. -t all) this can significantly reduce the amount of kernel memory that passt consumes. When forwarding all TCP and UDP ports for both IPv4 and IPv6 (-t all -u all), this reduces kernel memory usage from ~677MiB to ~487MiB (kernel version 6.0.8 on Fedora 37, x86_64). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.c')
0 files changed, 0 insertions, 0 deletions