1
0
Fork 0
mirror of https://passt.top/passt synced 2025-08-11 01:43:13 +02:00

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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson 2024-01-16 11:50:40 +11:00 committed by Stefano Brivio
commit fb7c00169d
7 changed files with 17 additions and 18 deletions

View file

@ -247,7 +247,7 @@ void tcp_splice_conn_update(const struct ctx *c, struct tcp_splice_conn *new)
* @c: Execution context
* @flow: Flow table entry for this connection
*/
void tcp_splice_flow_defer(struct ctx *c, union flow *flow)
void tcp_splice_flow_defer(const struct ctx *c, union flow *flow)
{
struct tcp_splice_conn *conn = &flow->tcp_splice;
unsigned side;