aboutgitcodebugslistschat
path: root/tcp_conn.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-02-19 18:56:50 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-02-27 12:52:46 +0100
commitfe27ebce5c59c7fc684c5affa6ce27fdc32d362d (patch)
tree903b8e243ebc30e0ae2abe578d3fb220249107d8 /tcp_conn.h
parentfbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65 (diff)
downloadpasst-fe27ebce5c59c7fc684c5affa6ce27fdc32d362d.tar
passt-fe27ebce5c59c7fc684c5affa6ce27fdc32d362d.tar.gz
passt-fe27ebce5c59c7fc684c5affa6ce27fdc32d362d.tar.bz2
passt-fe27ebce5c59c7fc684c5affa6ce27fdc32d362d.tar.lz
passt-fe27ebce5c59c7fc684c5affa6ce27fdc32d362d.tar.xz
passt-fe27ebce5c59c7fc684c5affa6ce27fdc32d362d.tar.zst
passt-fe27ebce5c59c7fc684c5affa6ce27fdc32d362d.zip
tcp, tcp_splice: Helpers for getting sockets from the pools
We maintain pools of ready-to-connect sockets in both the original and (for pasta) guest namespace to reduce latency when starting new TCP connections. If we exhaust those pools we have to take a higher latency path to get a new socket. Currently we open-code that fallback in the places we need it. To improve clarity encapsulate that into helper functions. While we're at it, give those helpers clearer error reporting. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_conn.h')
-rw-r--r--tcp_conn.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcp_conn.h b/tcp_conn.h
index 92d4807..d280b22 100644
--- a/tcp_conn.h
+++ b/tcp_conn.h
@@ -159,7 +159,7 @@ bool tcp_flow_defer(union flow *flow);
bool tcp_splice_flow_defer(union flow *flow);
void tcp_splice_timer(const struct ctx *c, union flow *flow);
int tcp_conn_pool_sock(int pool[]);
-int tcp_conn_new_sock(const struct ctx *c, sa_family_t af);
+int tcp_conn_sock(const struct ctx *c, sa_family_t af);
int tcp_sock_refill_pool(const struct ctx *c, int pool[], sa_family_t af);
void tcp_splice_refill(const struct ctx *c);