* [PATCH nf] netfilter: flowtable: Make sure GC works periodically in idle system
@ 2021-03-17 12:42 Simon Horman
2021-03-17 23:41 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2021-03-17 12:42 UTC (permalink / raw)
To: netfilter-devel; +Cc: oss-drivers, Yinjun Zhang, Louis Peens, Simon Horman
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.
Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
net/netfilter/nf_flow_table_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nf] netfilter: flowtable: Make sure GC works periodically in idle system
2021-03-17 12:42 [PATCH nf] netfilter: flowtable: Make sure GC works periodically in idle system Simon Horman
@ 2021-03-17 23:41 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2021-03-17 23:41 UTC (permalink / raw)
To: Simon Horman; +Cc: netfilter-devel, oss-drivers, Yinjun Zhang, Louis Peens
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-17 23:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-17 12:42 [PATCH nf] netfilter: flowtable: Make sure GC works periodically in idle system Simon Horman
2021-03-17 23:41 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).