From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Herbert Xu <herbert@gondor.apana.org.au>, davem@davemloft.net
Cc: netfilter-devel@vger.kernel.org, tgraf@suug.ch, netdev@vger.kernel.org
Subject: Re: [PATCH nf-next,v2 1/2] rhashtable: add rhashtable_lookup_get_insert_key()
Date: Fri, 26 Aug 2016 14:15:20 +0200 [thread overview]
Message-ID: <20160826121520.GA8729@salvia> (raw)
In-Reply-To: <20160826112736.GB20096@gondor.apana.org.au>
On Fri, Aug 26, 2016 at 07:27:36PM +0800, Herbert Xu wrote:
> On Thu, Aug 25, 2016 at 04:41:26PM +0200, Pablo Neira Ayuso wrote:
> > This patch modifies __rhashtable_insert_fast() so it returns the
> > existing object that clashes with the one that you want to insert.
> > In case the object is successfully inserted, NULL is returned.
> > Otherwise, you get an error via ERR_PTR().
> >
> > This patch adapts the existing callers of __rhashtable_insert_fast()
> > so they handle this new logic, and it adds a new
> > rhashtable_lookup_get_insert_key() interface to fetch this existing
> > object.
> >
> > nf_tables needs this change to improve handling of EEXIST cases via
> > honoring the NLM_F_EXCL flag and by checking if the data part of the
> > mapping matches what we have.
> >
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: Thomas Graf <tgraf@suug.ch>
> > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks Herbert!
@David, would you be OK if I get this rhashtable update through
nf-next given that I have a follow up patch that depending on this?
Will be sending a pull request asap so we don't get out of sync.
prev parent reply other threads:[~2016-08-26 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 14:41 [PATCH nf-next,v2 1/2] rhashtable: add rhashtable_lookup_get_insert_key() Pablo Neira Ayuso
2016-08-25 14:41 ` [PATCH nf-next,v2 2/2] netfilter: nf_tables: honor NLM_F_EXCL flag in set element insertion Pablo Neira Ayuso
2016-08-26 11:27 ` [PATCH nf-next,v2 1/2] rhashtable: add rhashtable_lookup_get_insert_key() Herbert Xu
2016-08-26 12:15 ` Pablo Neira Ayuso [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=20160826121520.GA8729@salvia \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=tgraf@suug.ch \
/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).