OSDN Git Service

netfilter: nf_tables: Implement fast bitwise expression
authorPhil Sutter <phil@nwl.cc>
Thu, 1 Oct 2020 16:57:44 +0000 (18:57 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 4 Oct 2020 19:08:33 +0000 (21:08 +0200)
commit10fdd6d80e4c21ad48f3860d723f5b3b5965477b
treebfc2834ea3fe446b5bf8c59082afba2e8836b25c
parent5f48846daf3321f8a1f8aa99cd6173e3980b7a29
netfilter: nf_tables: Implement fast bitwise expression

A typical use of bitwise expression is to mask out parts of an IP
address when matching on the network part only. Optimize for this common
use with a fast variant for NFT_BITWISE_BOOL-type expressions operating
on 32bit-sized values.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_tables_core.h
net/netfilter/nf_tables_core.c
net/netfilter/nft_bitwise.c