From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Roi Dayan <roid@mellanox.com>
Cc: netdev@vger.kernel.org, pablo@netfilter.org,
Paul Blakey <paulb@mellanox.com>, Oz Shlomo <ozsh@mellanox.com>
Subject: Re: [PATCH net 2/2] net/sched: act_ct: Set offload timeout when setting the offload bit
Date: Tue, 28 Jul 2020 11:42:49 -0300 [thread overview]
Message-ID: <20200728144249.GC3398@localhost.localdomain> (raw)
In-Reply-To: <20200728115759.426667-3-roid@mellanox.com>
On Tue, Jul 28, 2020 at 02:57:59PM +0300, Roi Dayan wrote:
> 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 <roid@mellanox.com>
> Reviewed-by: Oz Shlomo <ozsh@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,
Extra context line:
err = flow_offload_add(&ct_ft->nf_ft, entry);
> if (err)
> goto err_add;
>
> + nf_ct_offload_timeout(ct);
> +
What about adding this to flow_offload_add() instead?
It is already adjusting the flow_offload timeout there and then it
also effective for nft.
> return;
>
> err_add:
> --
> 2.8.4
>
next prev parent reply other threads:[~2020-07-28 14:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 11:57 [PATCH net 0/2] netfilter: conntrack: Fix CT offload timeout on heavily loaded systems Roi Dayan
2020-07-28 11:57 ` [PATCH net 1/2] netfilter: conntrack: Move nf_ct_offload_timeout to header file Roi Dayan
2020-07-28 11:57 ` [PATCH net 2/2] net/sched: act_ct: Set offload timeout when setting the offload bit Roi Dayan
2020-07-28 14:42 ` Marcelo Ricardo Leitner [this message]
2020-07-29 12:55 ` Roi Dayan
2020-07-29 17:10 ` Marcelo Ricardo Leitner
2020-08-03 7:21 ` Roi Dayan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200728144249.GC3398@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ozsh@mellanox.com \
--cc=pablo@netfilter.org \
--cc=paulb@mellanox.com \
--cc=roid@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).