Skip to content

netfilter: conntrack related cleanups

Florian Westphal netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5netfilter: conntrack: convert to refcount_t apiinclude/linux/netfilter/nf_conntrack_common.h net/netfilter/nf_conntrack_core.c net/netfilter/nf_conntrack_expect.c +8 more+27 -330 replies
2/5netfilter: core: move ip_ct_attach indirection to struct nf_ct_hookinclude/linux/netfilter.h net/netfilter/core.c net/netfilter/nf_conntrack_core.c+10 -150 replies
3/5netfilter: make function op structures constinclude/linux/netfilter.h net/netfilter/core.c net/netfilter/nf_conntrack_core.c +3 more+18 -180 replies
4/5netfilter: conntrack: avoid useless indirection during conntrack destructioninclude/linux/netfilter/nf_conntrack_common.h include/net/netfilter/nf_conntrack.h net/netfilter/nf_conntrack_core.c+14 -80 replies
5/5net: prefer nf_ct_put instead of nf_conntrack_putnet/netfilter/nf_conntrack_core.c net/openvswitch/conntrack.c net/sched/act_ct.c+15 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf-next 0/5] netfilter: conntrack related cleanups

This patch series contains cleanups to conntrack and related users such as ovs and act_ct.

First patch converts conntrack reference counting to refcount_t api. Second patch gets rid of ip_ct_attach hook, we can use existing nf_ct_hook for this.

Third patch constifies a couple of structures that don't need to be writeable.

Last two patches splits nf_ct_put and nf_conntrack_put. These functions still do the same thing, but now only nf_conntrack_put uses the nf_ct_hook indirection, nf_ct_put uses a direct call. Virtually all places should use nf_ct_put -- only core kernel code needs to use the indirection.

Before this change, nf_ct_put was merely an alias for nf_conntrack_put so even conntrack itself did additional indirection.

Florian Westphal (5):
netfilter: conntrack: convert to refcount_t api
netfilter: core: move ip_ct_attach indirection to struct nf_ct_hook
netfilter: make function op structures const
netfilter: conntrack: avoid useless indirection during conntrack
destruction
net: prefer nf_ct_put instead of nf_conntrack_put

 include/linux/netfilter.h                     | 10 ++--
 include/linux/netfilter/nf_conntrack_common.h | 10 ++--
 include/net/netfilter/nf_conntrack.h          |  8 ++-
 net/netfilter/core.c                          | 29 +++++------
 net/netfilter/nf_conntrack_core.c             | 50 +++++++++----------
 net/netfilter/nf_conntrack_expect.c           |  4 +-
 net/netfilter/nf_conntrack_netlink.c          | 10 ++--
 net/netfilter/nf_conntrack_standalone.c       |  4 +-
 net/netfilter/nf_flow_table_core.c            |  2 +-
 net/netfilter/nf_nat_core.c                   |  2 +-
 net/netfilter/nf_synproxy_core.c              |  1 -
 net/netfilter/nfnetlink_queue.c               |  8 +--
 net/netfilter/nft_ct.c                        |  4 +-
 net/netfilter/xt_CT.c                         |  3 +-
 net/openvswitch/conntrack.c                   | 15 ++++--
 net/sched/act_ct.c                            |  7 ++-
 16 files changed, 84 insertions(+), 83 deletions(-)
Signature · 1 line
2.34.1