Linux Netfilter development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
	netfilter-devel <netfilter-devel@vger.kernel.org>,
	Nadia Pinaeva <n.m.pinaeva@gmail.com>
Subject: Re: [PATCH nf-next] netfilter: conntrack: collect start time as early as possible
Date: Tue, 29 Oct 2024 08:16:24 +0100	[thread overview]
Message-ID: <20241029071624.GA16983@breakpoint.cc> (raw)
In-Reply-To: <ZyAZogr_F4GlCpPo@calendula>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Sat, Oct 26, 2024 at 12:50:13PM +0200, Florian Westphal wrote:
> > Sample start time at allocation time, not when the conntrack entry
> > is inserted into the hashtable.
> 
> Back at the time, long time ago, I remember to have measured a
> performance impact on this.

You mean when enabling timestamp + conntracks get dropped before
confirm, correct?

> > In most cases this makes very little difference, but there are
> > cases where there is significant delay beteen allocation and
> > confirmation, e.g. when packets get queued to userspace.
> 
> I delayed this to insertion time because packet could dropped before,
> rendering this conntrack timestamp useless? There is no event
> reporting for conntrack that never get confirmed.

Sure, but the "issue" is that the reported start time doesn't account
for a possible delay.  I did not measure huge delta before/after this
patch but if you have e.g. nfqueue in between alloc+confirm then the
start timestamp will account for that delay after this patch.

  reply	other threads:[~2024-10-29  7:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26 10:50 [PATCH nf-next] netfilter: conntrack: collect start time as early as possible Florian Westphal
2024-10-28 23:09 ` Pablo Neira Ayuso
2024-10-29  7:16   ` Florian Westphal [this message]
2024-10-29  9:53     ` Pablo Neira Ayuso
2024-10-29 11:18       ` Florian Westphal

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=20241029071624.GA16983@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=n.m.pinaeva@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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