Message ID | 20210317124224.16665-1-simon.horman@netronome.com |
---|---|
State | Accepted |
Delegated to: | Pablo Neira |
Headers | show |
Series | [nf] netfilter: flowtable: Make sure GC works periodically in idle system | expand |
On Wed, Mar 17, 2021 at 01:42:24PM +0100, Simon Horman wrote: > From: Yinjun Zhang <yinjun.zhang@corigine.com> > > 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.
diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c index 5fa657b8e03d..c77ba8690ed8 100644 --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c @@ -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);