• Herbert Xu's avatar
    netfilter: Convert nft_hash to inlined rhashtable · fa377321
    Herbert Xu authored
    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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fa377321
nft_hash.c 6.26 KB