On 01/16/15 at 03:37pm, Patrick McHardy wrote:
> On 02.01, Thomas Graf wrote:
> > +{
> > + struct nft_hash_elem *he = ptr;
> > + struct nft_compare_arg *x = arg;
> > +
> > + if (!nft_data_cmp(&he->key, &x->elem->key, x->set->klen)) {
> > + x->elem->cookie = &he->node;
> > +
On 02.01, Thomas Graf wrote:
> Hash the key inside of rhashtable_lookup_compare() like
> rhashtable_lookup() does. This allows to simplify the hashing
> functions and keep them private.
One more question:
> diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c
> index 1e316ce..614ee09
Hash the key inside of rhashtable_lookup_compare() like
rhashtable_lookup() does. This allows to simplify the hashing
functions and keep them private.
Signed-off-by: Thomas Graf
Cc: netfilter-de...@vger.kernel.org
---
include/linux/rhashtable.h | 5 +--
lib/rhashtable.c | 91 +
3 matches
Mail list logo