aboutgitcodebugslistschat
path: root/tcp_conn.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-02-19 18:56:49 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-02-27 12:52:44 +0100
commitfbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65 (patch)
tree4acc5b4b68156cb7044dc8091684d389b22b4119 /tcp_conn.h
parent554b3aefe7ab9799e251bdbcce504678a8dfbf12 (diff)
downloadpasst-fbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65.tar
passt-fbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65.tar.gz
passt-fbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65.tar.bz2
passt-fbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65.tar.lz
passt-fbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65.tar.xz
passt-fbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65.tar.zst
passt-fbe81decbdcdfed4b4ff336fcec5fe6ad0dfbe65.zip
tcp, tcp_splice: Issue warnings if unable to refill socket pool
Currently if tcp_sock_refill_pool() is unable to fill all the slots in the pool, it will silently exit. This might lead to a later attempt to get fds from the pool to fail at which point it will be harder to tell what originally went wrong. Instead add warnings if we're unable to refill any of the socket pools when requested. We have tcp_sock_refill_pool() return an error and report it in the callers, because those callers have more context allowing for a more useful message. 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 20c7cb8..92d4807 100644
--- a/tcp_conn.h
+++ b/tcp_conn.h
@@ -160,7 +160,7 @@ 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);
-void tcp_sock_refill_pool(const struct ctx *c, int pool[], 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);
#endif /* TCP_CONN_H */