netfilter: flowtable: Make sure GC works periodically in idle system
Subsystems (2)
PATCH 1/1 netfilter: flowtable: Make sure GC works periodically in idle system
From: Yinjun Zhang <[email protected]>
Currently flowtable's GC work is initialized as deferrable, which means GC cannot work on time when system is idle. So the hardware offloaded flow may be deleted for timeout, since its used time is not timely updated.
Resolve it by initializing the GC work as delayed work instead of deferrable.
--- net/netfilter/nf_flow_table_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_flow_table_core.c +1 -1
@@ -506,7 +506,7 @@ int nf_flow_table_init(struct nf_flowtable *flowtable) {int err; -INIT_DEFERRABLE_WORK (&flowtable->gc_work, nf_flow_offload_work_gc); +INIT_DELAYED_WORK (&flowtable->gc_work, nf_flow_offload_work_gc);flow_block_init (&flowtable->flow_block);init_rwsem (&flowtable->flow_block_lock);
Signature · 1 line
2.20.1
Quoted 9 lines · Simon Horman
From: Yinjun Zhang <[email protected]>
Currently flowtable's GC work is initialized as deferrable, which means GC cannot work on time when system is idle. So the hardware offloaded flow may be deleted for timeout, since its used time is not timely updated.
Resolve it by initializing the GC work as delayed work instead of deferrable.
Applied, thanks.