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 --- flow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'flow.h') diff --git a/flow.h b/flow.h index 423e685..44058bf 100644 --- a/flow.h +++ b/flow.h @@ -68,8 +68,8 @@ static inline bool flow_sidx_eq(flow_sidx_t a, flow_sidx_t b) union flow; -void flow_table_compact(struct ctx *c, union flow *hole); -void flow_defer_handler(struct ctx *c, const struct timespec *now); +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, ...) __attribute__((format(printf, 3, 4))); -- cgit v1.2.3