mirror of
https://passt.top/passt
synced 2025-06-17 04:35:35 +02:00
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
4a849e9526
commit
9c0881d4f6
5 changed files with 21 additions and 15 deletions
1
flow.h
1
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, ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue