From 9c0881d4f6dd651fd2a40896b54d554cb7ba5b2e Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 16 Jan 2024 11:50:42 +1100 Subject: flow: Enforce that freeing of closed flows must happen in deferred handlers Currently, flows are only evern finally freed (and the table compacted) from the deferred handlers. Some future ways we want to optimise managing the flow table will rely on this, so enforce it: rather than having the TCP code directly call flow_table_compact(), add a boolean return value to the per-flow deferred handlers. If true, this indicates that the flow code itself should free the flow. This forces all freeing of flows to occur during the flow code's scan of the table in flow_defer_handler() which opens possibilities for future optimisations. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- flow.h | 1 - 1 file changed, 1 deletion(-) (limited to 'flow.h') diff --git a/flow.h b/flow.h index 44058bf..8064f0e 100644 --- a/flow.h +++ b/flow.h @@ -68,7 +68,6 @@ static inline bool flow_sidx_eq(flow_sidx_t a, flow_sidx_t b) union flow; -void flow_table_compact(const struct ctx *c, union flow *hole); void flow_defer_handler(const struct ctx *c, const struct timespec *now); void flow_log_(const struct flow_common *f, int pri, const char *fmt, ...) -- cgit v1.2.3