All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf-next 0/4] netfilter: conntrack: avoid eache extension allocation
@ 2022-04-25 13:15 Florian Westphal
  2022-04-25 13:15 ` [PATCH nf-next 1/4] netfilter: nfnetlink: allow to detect if ctnetlink listeners exist Florian Westphal
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Florian Westphal @ 2022-04-25 13:15 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

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(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-09  6:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-25 13:15 [PATCH nf-next 0/4] netfilter: conntrack: avoid eache extension allocation Florian Westphal
2022-04-25 13:15 ` [PATCH nf-next 1/4] netfilter: nfnetlink: allow to detect if ctnetlink listeners exist Florian Westphal
2022-04-25 13:15 ` [PATCH nf-next 2/4] netfilter: conntrack: un-inline nf_ct_ecache_ext_add Florian Westphal
2022-04-25 13:15 ` [PATCH nf-next 3/4] netfilter: conntrack: add nf_conntrack_events autodetect mode Florian Westphal
2022-04-25 13:15 ` [PATCH nf-next 4/4] netfilter: prefer extension check to pointer check Florian Westphal
2022-05-09  6:07 ` [PATCH nf-next 0/4] netfilter: conntrack: avoid eache extension allocation Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.