netfilter: conntrack: avoid eache extension allocation
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | netfilter: nfnetlink: allow to detect if ctnetlink listeners existinclude/ net/ | +38 | 0 replies | |
| 2/4 | netfilter: conntrack: un-inline nf_ct_ecache_ext_addinclude/ net/ net/ | +38 | 0 replies | |
| 3/4 | netfilter: conntrack: add nf_conntrack_events autodetect modeDocumentation/ net/ net/ +1 more | +28 | 0 replies | |
| 4/4 | netfilter: prefer extension check to pointer checkinclude/ include/ | +16 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nf-next 0/4] netfilter: conntrack: avoid eache extension allocation
This patch series changes ecache infra to no longer allocate the extension by default.
After this series, the default behaviour is to allocate the extension if either a conntrack template has been set to configure event masks via nft/iptables ruleset, the syctl 'nf_conntrack_events' is set to 1, or if a userspace program has subscribed to one of the ctnetlink event groups.
This has advantages in case the events are not used:
1. Conntrack allocation/free avoids extra kmalloc/kfree call.
2. nf_confirm hook doesn't perform an indirect call into ctnetlink only to discover that there is nothing to do.
Florian Westphal (4):
netfilter: nfnetlink: allow to detect if ctnetlink listeners exist
netfilter: conntrack: un-inline nf_ct_ecache_ext_add
netfilter: conntrack: add nf_conntrack_events autodetect mode
netfilter: prefer extension check to pointer check
.../networking/nf_conntrack-sysctl.rst | 5 +- include/net/netfilter/nf_conntrack_core.h | 2 +- include/net/netfilter/nf_conntrack_ecache.h | 49 ++++++------------- include/net/netns/conntrack.h | 1 + net/netfilter/nf_conntrack_core.c | 15 ++++-- net/netfilter/nf_conntrack_ecache.c | 39 ++++++++++++++- net/netfilter/nf_conntrack_standalone.c | 2 +- net/netfilter/nfnetlink.c | 40 +++++++++++++-- 8 files changed, 108 insertions(+), 45 deletions(-)
Signature · 1 line
2.35.1