netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Dirk Morris <dmorris@metaloft.com>
Cc: Florian Westphal <fw@strlen.de>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net] netfilter: Use consistent ct id hash calculation
Date: Thu, 8 Aug 2019 12:28:30 +0200	[thread overview]
Message-ID: <20190808102830.yl2wso3ax7nyiq5k@breakpoint.cc> (raw)
In-Reply-To: <f58a512a-0b74-c98d-067d-70ef67da0a95@metaloft.com>

Dirk Morris <dmorris@metaloft.com> wrote:
> On 8/7/19 4:45 PM, Florian Westphal wrote:
> > So Pablos suggestion above should work just fine.
> > Dirk, can you spin a v2 with that change?
> > 
> 
> Yes, will do tomorrow.

Thanks.

> Also, just an idea, I also played around with just adding
> u32 id to struct nf_conn and just calculating the hash inside
> __nf_conntack_alloc when initialized or even lazily in nf_ct_get_id.
> This seems to work fine and you don't have to worry about anything changing
> and only calculate the hash once.
> 
> I'm presuming this method was avoided for some reason, like keeping the struct
> size to a minimum.

Yes, exactly.

If we go for storing id in the struct we could also just use a random
value rather than computing a hash.

      reply	other threads:[~2019-08-08 10:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  0:25 [PATCH net] netfilter: Use consistent ct id hash calculation Dirk Morris
2019-08-07  0:34 ` Florian Westphal
2019-08-07  0:57   ` Dirk Morris
2019-08-07 16:36     ` Pablo Neira Ayuso
2019-08-07 18:01       ` Florian Westphal
2019-08-07 20:31         ` Pablo Neira Ayuso
2019-08-07 23:45           ` Florian Westphal
2019-08-08  5:01             ` Dirk Morris
2019-08-08 10:28               ` Florian Westphal [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=20190808102830.yl2wso3ax7nyiq5k@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=dmorris@metaloft.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;
as well as URLs for NNTP newsgroup(s).