Commit 740b486a authored by Yinjun Zhang's avatar Yinjun Zhang Committed by Pablo Neira Ayuso

netfilter: flowtable: Make sure GC works periodically in idle system

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.

Fixes: c29f74e0 ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: default avatarYinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: default avatarLouis Peens <louis.peens@corigine.com>
Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 7b35582c
...@@ -506,7 +506,7 @@ int nf_flow_table_init(struct nf_flowtable *flowtable) ...@@ -506,7 +506,7 @@ int nf_flow_table_init(struct nf_flowtable *flowtable)
{ {
int err; 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); flow_block_init(&flowtable->flow_block);
init_rwsem(&flowtable->flow_block_lock); init_rwsem(&flowtable->flow_block_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment