aboutgitcodebugslistschat
path: root/tcp_splice.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-11-17 16:58:46 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-11-25 01:34:51 +0100
commitee8f8e9564c5bd0ca25a9492e3102655d9ce0620 (patch)
tree3f92b16d5e4ea22bbc2698008f7bd8475e794732 /tcp_splice.h
parent181ce83d9bc52487f99401afe39a73499bd128fe (diff)
downloadpasst-ee8f8e9564c5bd0ca25a9492e3102655d9ce0620.tar
passt-ee8f8e9564c5bd0ca25a9492e3102655d9ce0620.tar.gz
passt-ee8f8e9564c5bd0ca25a9492e3102655d9ce0620.tar.bz2
passt-ee8f8e9564c5bd0ca25a9492e3102655d9ce0620.tar.lz
passt-ee8f8e9564c5bd0ca25a9492e3102655d9ce0620.tar.xz
passt-ee8f8e9564c5bd0ca25a9492e3102655d9ce0620.tar.zst
passt-ee8f8e9564c5bd0ca25a9492e3102655d9ce0620.zip
tcp: Unify spliced and non-spliced connection tables
Currently spliced and non-spliced connections are stored in completely separate tables, so there are completely independent limits on the number of spliced and non-spliced connections. This is a bit counter-intuitive. More importantly, the fact that the tables are separate prevents us from unifying some other logic between the two cases. So, merge these two tables into one, using the 'c.spliced' common field to distinguish between them when necessary. For now we keep a common limit of 128k connections, whether they're spliced or non-spliced, which means we save memory overall. If necessary we could increase this to a 256k or higher total, which would cost memory but give some more flexibility. For now, the code paths which need to step through all extant connections are still separate for the two cases, just skipping over entries which aren't for them. We'll improve that in later patches. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_splice.h')
-rw-r--r--tcp_splice.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/tcp_splice.h b/tcp_splice.h
index 2c4bff3..e8c70e9 100644
--- a/tcp_splice.h
+++ b/tcp_splice.h
@@ -6,8 +6,6 @@
#ifndef TCP_SPLICE_H
#define TCP_SPLICE_H
-#define TCP_SPLICE_MAX_CONNS (128 * 1024)
-
void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
uint32_t events);
void tcp_splice_init(struct ctx *c);