From fb7c00169d49a99ea2d14dae05bf0c8190f0971c Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 16 Jan 2024 11:50:40 +1100 Subject: flow: Move flow_count from context structure to a global In general, the passt code is a bit haphazard about what's a true global variable and what's in the quasi-global 'context structure'. The flow_count field is one such example: it's in the context structure, although it's really part of the same data structure as flowtab[], which is a genuine global. Move flow_count to be a regular global to match. For now it needs to be public, rather than static, but we expect to be able to change that in future. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- tcp_conn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tcp_conn.h') diff --git a/tcp_conn.h b/tcp_conn.h index 72b9ecb..825155a 100644 --- a/tcp_conn.h +++ b/tcp_conn.h @@ -158,8 +158,8 @@ 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); -void tcp_flow_defer(struct ctx *c, union flow *flow); -void tcp_splice_flow_defer(struct ctx *c, union flow *flow); +void tcp_flow_defer(const struct ctx *c, union flow *flow); +void tcp_splice_flow_defer(const struct ctx *c, 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); -- cgit v1.2.3