All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oz Shlomo <ozsh@nvidia.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netfilter-devel@vger.kernel.org>, Paul Blakey <paulb@nvidia.com>,
	"Marcelo Ricardo Leitner" <marcelo.leitner@gmail.com>
Subject: Re: [PATCH nf] netfilter: conntrack: remove offload_pickup sysctl again
Date: Wed, 4 Aug 2021 14:54:23 +0300	[thread overview]
Message-ID: <c66e0d7c-8d99-3dbf-59fa-745133799b43@nvidia.com> (raw)
In-Reply-To: <20210804111934.GE607@breakpoint.cc>

Hi Florian,

On 8/4/2021 2:19 PM, Florian Westphal wrote:
> Oz Shlomo <ozsh@nvidia.com> wrote:
>>> When flow transitions back from offload to software, also clear the
>>> ASSURED bit -- this allows conntrack to early-expire the entry in case
>>> the table is full.
>>
>> Doesn't this introduce a discrpency between offloaded and non-offload connections?
>> IIUC, offloaded connections might timeout earlier after they are picked up
>> by the software when the conntrack table is full.
> 
> Yes, if no packet was seen after the flow got moved back to software and
> a new connection request is made while table is full.
> 

Then perhaps it is better not to clear the ASSURED bit.
What do you think?

>> However, if the same tcp connection was not offloaded it would timeout after 5 days.
> 
> Yes.  The problem is that AFAIU HW may move flow back to SW path after
> it saw e.g. FIN bit, or after one side went silent (i.e., unacked data).
> 
> And and in that case, SW path has a lot smaller timeout than the 5day
> established value.
> 
> AFAICS there is no way to detect this on generic side and it might even
> be different depending on hw/driver?
> 

Actually, the hardware sends all packets with a set FIN flags to sw.
When act_ct processes a FIN packet it sets the teardown flag for the offloaded connection and 
continues to process the packet through nf conntrack.
Therefore, the connection timeout interval will be updated by nf conntrack.

Connections that are aged in hardware are expected to be in the established state.
Therefore, the pickup time should align with the nf conntrack settings.





      reply	other threads:[~2021-08-04 11:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  9:25 [PATCH nf] netfilter: conntrack: remove offload_pickup sysctl again Florian Westphal
2021-08-04 11:00 ` Oz Shlomo
2021-08-04 11:19   ` Florian Westphal
2021-08-04 11:54     ` Oz Shlomo [this message]

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=c66e0d7c-8d99-3dbf-59fa-745133799b43@nvidia.com \
    --to=ozsh@nvidia.com \
    --cc=fw@strlen.de \
    --cc=marcelo.leitner@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=paulb@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.