public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	Thomas Graf <tgraf@suug.ch>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [v1 PATCH 2/7] rhashtable: Allow hash/comparison functions to be inlined
Date: Fri, 20 Mar 2015 12:06:32 +0000	[thread overview]
Message-ID: <20150320120632.GJ28736@acer.localdomain> (raw)
In-Reply-To: <20150320120228.GA18736@gondor.apana.org.au>

On 20.03, Herbert Xu wrote:
> On Fri, Mar 20, 2015 at 11:20:42AM +0000, Patrick McHardy wrote:
> >
> > I haven't checked in detail yet whether this still satisfies what
> > we need in nftables, just a minor comment below:
> 
> AFAIK I have done nothing to break multiple keys as yet and
> the comparison function is still there, just embedded into the
> params structure.

Yep, seems fine on a quick skim, but it will take until tonight before
I can have a closer look.

> > > +struct rhashtable_compare_arg {
> > > +	struct rhashtable *ht;
> > > +	const void *key;
> > > +};
> > 
> > I found it a bit odd in the old interface that elementary data
> > such as the key for comparision is encapsulated into a structure
> > instead of passed as a function argument. Is there a reason
> > for not passing both as arguments so we can at least avoid the
> > encapsulation for the common case?
> 
> I don't have any objections against changing it but it could
> be done outside of this particular patch-set.

Absolutely. Just thought I mention it since you already touched all
relevant parts.

  reply	other threads:[~2015-03-20 12:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 10:54 [v1 PATCH 0/7] rhashtable: Introduce inlined interface Herbert Xu
2015-03-20 10:56 ` [v1 PATCH 1/7] rhashtable: Make rhashtable_init params argument const Herbert Xu
2015-03-20 13:16   ` Thomas Graf
2015-03-20 10:57 ` [v1 PATCH 2/7] rhashtable: Allow hash/comparison functions to be inlined Herbert Xu
2015-03-20 11:20   ` Patrick McHardy
2015-03-20 12:02     ` Herbert Xu
2015-03-20 12:06       ` Patrick McHardy [this message]
2015-03-20 10:57 ` [v1 PATCH 3/7] netlink: Move namespace into hash key Herbert Xu
2015-03-20 10:57 ` [v1 PATCH 4/7] netfilter: Convert nft_hash to inlined rhashtable Herbert Xu
2015-03-20 10:57 ` [v1 PATCH 5/7] test_rhashtable: Use inlined rhashtable interface Herbert Xu
2015-03-20 10:57 ` [v1 PATCH 6/7] tipc: " Herbert Xu
2015-03-20 10:57 ` [v1 PATCH 7/7] rhashtable: Rip out obsolete out-of-line interface Herbert Xu
2015-03-20 20:25   ` Thomas Graf
2015-03-20 21:24     ` Herbert Xu
2015-03-20 20:17 ` [v1 PATCH 0/7] rhashtable: Introduce inlined interface David Miller
2015-03-20 21:28   ` Herbert Xu
2015-03-20 22:17     ` David Miller
2015-03-20 22:21       ` Herbert Xu
2015-03-20 22:37         ` David Miller
2015-03-21  3:14           ` Herbert Xu
2015-03-21  4:17             ` David Miller

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=20150320120632.GJ28736@acer.localdomain \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@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