aboutgitcodebugslistschat
path: root/tcp_splice.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-11-30 13:02:08 +1100
committerStefano Brivio <sbrivio@redhat.com>2023-12-04 09:50:59 +0100
commit16ae03260800b8044efa541edcf43d4fb83b740d (patch)
treed73a23be231d58d1bce0e67c4cab26997e6ea7e2 /tcp_splice.c
parentba84a3b17af81e25bb11854052c616f399ba4275 (diff)
downloadpasst-16ae03260800b8044efa541edcf43d4fb83b740d.tar
passt-16ae03260800b8044efa541edcf43d4fb83b740d.tar.gz
passt-16ae03260800b8044efa541edcf43d4fb83b740d.tar.bz2
passt-16ae03260800b8044efa541edcf43d4fb83b740d.tar.lz
passt-16ae03260800b8044efa541edcf43d4fb83b740d.tar.xz
passt-16ae03260800b8044efa541edcf43d4fb83b740d.tar.zst
passt-16ae03260800b8044efa541edcf43d4fb83b740d.zip
flow, tcp: Generalise connection types
Currently TCP connections use a 1-bit selector, 'spliced', to determine the rest of the contents of the structure. We want to generalise the TCP connection table to other types of flows in other protocols. Make a start on this by replacing the tcp_conn_common structure with a new flow_common structure with an enum rather than a simple boolean indicating the type of flow. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.c')
-rw-r--r--tcp_splice.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tcp_splice.c b/tcp_splice.c
index 0a23584..c55c491 100644
--- a/tcp_splice.c
+++ b/tcp_splice.c
@@ -54,6 +54,7 @@
#include "tcp_splice.h"
#include "siphash.h"
#include "inany.h"
+#include "flow.h"
#include "tcp_conn.h"
@@ -476,7 +477,7 @@ bool tcp_splice_conn_from_sock(const struct ctx *c,
if (setsockopt(s, SOL_TCP, TCP_QUICKACK, &((int){ 1 }), sizeof(int)))
trace("TCP (spliced): failed to set TCP_QUICKACK on %i", s);
- conn->c.spliced = true;
+ conn->f.type = FLOW_TCP_SPLICE;
conn->s[0] = s;
if (tcp_splice_new(c, conn, ref.port, ref.pif))