aboutgitcodebugslistschat
path: root/tcp_conn.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-01-16 11:50:43 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-01-22 23:35:37 +0100
commit8981a720aac4ab22beb3375cd77062a8aed693e6 (patch)
tree16cdc6bec085763de21b705f5c8188990251f50d /tcp_conn.h
parent9c0881d4f6dd651fd2a40896b54d554cb7ba5b2e (diff)
downloadpasst-8981a720aac4ab22beb3375cd77062a8aed693e6.tar
passt-8981a720aac4ab22beb3375cd77062a8aed693e6.tar.gz
passt-8981a720aac4ab22beb3375cd77062a8aed693e6.tar.bz2
passt-8981a720aac4ab22beb3375cd77062a8aed693e6.tar.lz
passt-8981a720aac4ab22beb3375cd77062a8aed693e6.tar.xz
passt-8981a720aac4ab22beb3375cd77062a8aed693e6.tar.zst
passt-8981a720aac4ab22beb3375cd77062a8aed693e6.zip
flow: Avoid moving flow entries to compact table
Currently we always keep the flow table maximally compact: that is all the active entries are contiguous at the start of the table. Doing this sometimes requires moving an entry when one is freed. That's kind of fiddly, and potentially expensive: it requires updating the hash table for the new location, and depending on flow type, it may require EPOLL_CTL_MOD, system calls to update epoll tags with the new location too. Implement a new way of managing the flow table that doesn't ever move entries. It attempts to maintain some compactness by always using the first free slot for a new connection, and mitigates the effect of non compactness by cheaply skipping over contiguous blocks of free entries. See the "theory of operation" comment in flow.c for details. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>b [sbrivio: additional ASSERT(flow_first_free <= FLOW_MAX - 2) to avoid Coverity Scan false positive] Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_conn.h')
-rw-r--r--tcp_conn.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/tcp_conn.h b/tcp_conn.h
index 636224e..a5f5cfe 100644
--- a/tcp_conn.h
+++ b/tcp_conn.h
@@ -155,9 +155,6 @@ struct tcp_splice_conn {
extern int init_sock_pool4 [TCP_SOCK_POOL_SIZE];
extern int init_sock_pool6 [TCP_SOCK_POOL_SIZE];
-void tcp_tap_conn_update(const struct ctx *c, struct tcp_tap_conn *old,
- struct tcp_tap_conn *new);
-void tcp_splice_conn_update(const struct ctx *c, struct tcp_splice_conn *new);
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);