mbox series

[nf-next,0/5] netfilter: ecache: simplify event registration

Message ID 20210816151626.28770-1-fw@strlen.de
Headers show
Series netfilter: ecache: simplify event registration | expand

Message

Florian Westphal Aug. 16, 2021, 3:16 p.m. UTC
This patchset simplifies event registration handling.

Event and expectation handler registration is merged into one.
This reduces boilerplate code during netns register/unregister.

Also, there is only one implementation of the event handler
(ctnetlink), so it makes no sense to return -EBUSY if another
handler is registered already -- it cannot happen.

This also allows to remove the 'nf_exp_event_notifier' pointer
from struct net.

Florian Westphal (5):
  netfilter: ecache: remove one indent level
  netfilter: ecache: remove another indent level
  netfilter: ecache: add common helper for nf_conntrack_eventmask_report
  netfilter: ecache: prepare for event notifier merge
  netfilter: ecache: remove nf_exp_event_notifier structure

 include/net/netfilter/nf_conntrack_ecache.h |  32 +--
 include/net/netns/conntrack.h               |   1 -
 net/netfilter/nf_conntrack_ecache.c         | 211 +++++++-------------
 net/netfilter/nf_conntrack_netlink.c        |  50 +----
 4 files changed, 96 insertions(+), 198 deletions(-)

Comments

Pablo Neira Ayuso Aug. 25, 2021, 11:05 a.m. UTC | #1
On Mon, Aug 16, 2021 at 05:16:21PM +0200, Florian Westphal wrote:
> This patchset simplifies event registration handling.
> 
> Event and expectation handler registration is merged into one.
> This reduces boilerplate code during netns register/unregister.
> 
> Also, there is only one implementation of the event handler
> (ctnetlink), so it makes no sense to return -EBUSY if another
> handler is registered already -- it cannot happen.
> 
> This also allows to remove the 'nf_exp_event_notifier' pointer
> from struct net.

Series applied, thanks.