alistair23-linux/include
Phil Sutter 71cc0873e0 netfilter: nf_tables: Simplify set backend selection
Drop nft_set_type's ability to act as a container of multiple backend
implementations it chooses from. Instead consolidate the whole selection
logic in nft_select_set_ops() and the actual backend provided estimate()
callback.

This turns nf_tables_set_types into a list containing all available
backends which is traversed when selecting one matching userspace
requested criteria.

Also, this change allows to embed nft_set_ops structure into
nft_set_type and pull flags field into the latter as it's only used
during selection phase.

A crucial part of this change is to make sure the new layout respects
hash backend constraints formerly enforced by nft_hash_select_ops()
function: This is achieved by introduction of a specific estimate()
callback for nft_hash_fast_ops which returns false for key lengths != 4.
In turn, nft_hash_estimate() is changed to return false for key lengths
== 4 so it won't be chosen by accident. Also, both callbacks must return
false for unbounded sets as their size estimate depends on a known
maximum element count.

Note that this patch partially reverts commit 4f2921ca21 ("netfilter:
nf_tables: meter: pick a set backend that supports updates") by making
nft_set_ops_candidate() not explicitly look for an update callback but
make NFT_SET_EVAL a regular backend feature flag which is checked along
with the others. This way all feature requirements are checked in one
go.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2018-04-24 10:29:11 +02:00
..
acpi xen: fixes for 4.17-rc1 2018-04-12 11:04:35 -07:00
asm-generic asm-generic fixes for v4.17-rc1 2018-04-12 09:15:48 -07:00
clocksource
crypto
drm
dt-bindings
keys
kvm
linux soc: ti: K2G: provide APIs to support driver probe deferral 2018-04-18 21:00:56 -04:00
math-emu
media media updates for v4.17-rc1 2018-04-10 10:10:30 -07:00
memory
misc
net netfilter: nf_tables: Simplify set backend selection 2018-04-24 10:29:11 +02:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace net: Remove unused tcp_set_state tracepoint 2018-04-16 19:02:15 -04:00
uapi vxlan: add ttl inherit support 2018-04-17 13:53:13 -04:00
video
xen xen/pvh: Indicate XENFEAT_linux_rsdp_unrestricted to Xen 2018-04-10 09:22:22 -04:00