mbox series

[net,v2,0/2] netfilter: conntrack: Fix CT offload timeout on heavily loaded systems

Message ID 20200803073305.702079-1-roid@mellanox.com
Headers show
Series netfilter: conntrack: Fix CT offload timeout on heavily loaded systems | expand

Message

Roi Dayan Aug. 3, 2020, 7:33 a.m. UTC
On heavily loaded systems the GC can take time to go over all existing
conns and reset their timeout. At that time other calls like from
nf_conntrack_in() can call of nf_ct_is_expired() and see the conn as
expired. To fix this when we set the offload bit we should also reset
the timeout instead of counting on GC to finish first iteration over
all conns before the initial timeout.

First commit is to expose the function that updates the timeout.
Second commit is to use it from flow_offload_add().

Roi Dayan (2):
  netfilter: conntrack: Move nf_ct_offload_timeout to header file
  netfilter: flowtable: Set offload timeout when adding flow

 include/net/netfilter/nf_conntrack.h | 12 ++++++++++++
 net/netfilter/nf_conntrack_core.c    | 12 ------------
 net/netfilter/nf_flow_table_core.c   |  2 ++
 3 files changed, 14 insertions(+), 12 deletions(-)