Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH nf-next] nft_set_pipapo: Drop useless assignment of scratch map index on insert
Date: Wed, 17 Jun 2020 22:17:39 +0200
Message-ID: <20200617221739.7a5bf4f5@redhat.com> (raw)
In-Reply-To: <20200617200705.GA31049@salvia>

On Wed, 17 Jun 2020 22:07:05 +0200
Pablo Neira Ayuso <pablo@netfilter.org> wrote:

> On Sun, Jun 14, 2020 at 11:42:07PM +0200, Stefano Brivio wrote:
> > In nft_pipapo_insert(), we need to reallocate scratch maps that will
> > be used for matching by lookup functions, if they have never been
> > allocated or if the bucket size changes as a result of the insertion.
> > 
> > As pipapo_realloc_scratch() provides a pair of fresh, zeroed out
> > maps, there's no need to select a particular one after reallocation.
> > 
> > Other than being useless, the existing assignment was also troubled
> > by the fact that the index was set only on the CPU performing the
> > actual insertion, as spotted by Florian.
> > 
> > Simply drop the assignment.
> > 
> > Reported-by: Florian Westphal <fw@strlen.de>
> > Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges")  
> 
> Hm.
> 
> It has a Fixes: tag.
> 
> Probably route this through nf.git instead?

I wouldn't, because it just removes a redundant assignment (so I
consider it a fix) but it doesn't fix any functional issue. Is there a
specific reason why I should?

-- 
Stefano


  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 21:42 Stefano Brivio
2020-06-17 20:00 ` Pablo Neira Ayuso
2020-06-17 20:07 ` Pablo Neira Ayuso
2020-06-17 20:17   ` Stefano Brivio [this message]
2020-06-30 16:44 ` Pablo Neira Ayuso

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=20200617221739.7a5bf4f5@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=fw@strlen.de \
    --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

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org
	public-inbox-index netfilter-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git