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.
Fixes: 64ff70b80fd4 ("net/sched: act_ct: Offload established connections to flow table") Signed-off-by: Roi Dayan <r...@mellanox.com> Reviewed-by: Oz Shlomo <o...@mellanox.com> --- net/sched/act_ct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index e9f3576cbf71..650c2d78a346 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -366,6 +366,8 @@ static void tcf_ct_flow_table_add(struct tcf_ct_flow_table *ct_ft, if (err) goto err_add; + nf_ct_offload_timeout(ct); + return; err_add: -- 2.8.4