[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150322044746.GA31192@acer.localdomain>
Date: Sun, 22 Mar 2015 04:47:47 +0000
From: Patrick McHardy <kaber@...sh.net>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: pablo@...filter.org, davem@...emloft.net, tgraf@...g.ch,
netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] rhashtable: provide len to obj_hashfn
On 22.03, Herbert Xu wrote:
> On Sat, Mar 21, 2015 at 03:38:09PM +0000, Patrick McHardy wrote:
> > nftables sets will be converted to use so called setextensions, moving
> > the key to a non-fixed position. To hash it, the obj_hashfn must be used,
> > however it so far doesn't receive the length parameter.
> >
> > Pass the key length to obj_hashfn() and convert existing users.
> >
> > Signed-off-by: Patrick McHardy <kaber@...sh.net>
>
> I presume you've got the offset embedded inside the object. Can
> you show us what your actual code looks like? I'm wondering if you
> could instead provide rhashtable with a fixed offset key with the
> object offset embedded in the key that then lets you go back up to
> figure out the object?
Correct, the set extensions are added on demand and contain an offset
for every extension type. The offset is usually not, but may be
different for different elements.
Embedding the offset is not something I want to do. Again, this stuff
is meant to be as compact as possible and it serves no purpose at all.
What is the problem with using these callbacks?
View attachment "set-ext.diff" of type "text/plain" (19699 bytes)
View attachment "set-ext.diff" of type "text/plain" (19700 bytes)
Powered by blists - more mailing lists