aboutgitcodebugslistschat
path: root/tcp_buf.h
diff options
context:
space:
mode:
authorJon Maloy <jmaloy@redhat.com>2024-10-28 22:14:00 -0400
committerStefano Brivio <sbrivio@redhat.com>2024-10-29 12:44:08 +0100
commitba38e67cf405c5fd4c0fc043af453fa23a55fb35 (patch)
tree4dd24787bf1d857faed9e1394d4f25182dd18b42 /tcp_buf.h
parent2053c36dec4ce3e5bfddb52f5f2957165a692f1d (diff)
downloadpasst-ba38e67cf405c5fd4c0fc043af453fa23a55fb35.tar
passt-ba38e67cf405c5fd4c0fc043af453fa23a55fb35.tar.gz
passt-ba38e67cf405c5fd4c0fc043af453fa23a55fb35.tar.bz2
passt-ba38e67cf405c5fd4c0fc043af453fa23a55fb35.tar.lz
passt-ba38e67cf405c5fd4c0fc043af453fa23a55fb35.tar.xz
passt-ba38e67cf405c5fd4c0fc043af453fa23a55fb35.tar.zst
passt-ba38e67cf405c5fd4c0fc043af453fa23a55fb35.zip
tcp: unify l2 TCPv4 and TCPv6 queues and structuresHEADmaster
Following the preparations in the previous commit, we can now remove the payload and flag queues dedicated for TCPv6 and TCPv4 and move all traffic into common queues handling both protocol types. Apart from reducing code and memory footprint, this change reduces a potential risk for TCPv4 traffic starving out TCPv6 traffic. Since we always flush out the TCPv4 frame queue before the TCPv6 queue, the latter will never be handled if the former fails to send all its frames. Tests with iperf3 shows no measurable change in performance after this change. Signed-off-by: Jon Maloy <jmaloy@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_buf.h')
-rw-r--r--tcp_buf.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/tcp_buf.h b/tcp_buf.h
index 8d4b615..49c04d4 100644
--- a/tcp_buf.h
+++ b/tcp_buf.h
@@ -6,8 +6,7 @@
#ifndef TCP_BUF_H
#define TCP_BUF_H
-void tcp_sock4_iov_init(const struct ctx *c);
-void tcp_sock6_iov_init(const struct ctx *c);
+void tcp_sock_iov_init(const struct ctx *c);
void tcp_flags_flush(const struct ctx *c);
void tcp_payload_flush(const struct ctx *c);
int tcp_buf_data_from_sock(const struct ctx *c, struct tcp_tap_conn *conn);