]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: Convert nft_hash to inlined rhashtable
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Mar 2015 10:57:02 +0000 (21:57 +1100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Mar 2015 20:16:24 +0000 (16:16 -0400)
commit16934106da2b1995bf95f31873c8ea3ed0f599a8
tree091bc12c3e98e72cd7c6284eac1beeffe0dae9d4
parenteea73e5d36f802c109c8f304d2c4a9291a377aea
netfilter: Convert nft_hash to inlined rhashtable

This patch converts nft_hash to the inlined rhashtable interface.

This patch also replaces the call to rhashtable_lookup_compare with
a straight rhashtable_lookup_fast because it's simply doing a memcmp
(in fact nft_hash_lookup already uses memcmp instead of nft_data_cmp).

Furthermore, the compare function is only meant to compare, it is not
supposed to have side-effects.  The current side-effect code can
simply be moved into the nft_hash_get.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nft_hash.c