Skip to content

netfilter: conntrack: removal prealloc support

Florian Westphal netfilter-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3netfilter: conntrack: remove prealloc supportinclude/net/netfilter/nf_conntrack_extend.h net/netfilter/nf_conntrack_extend.c net/netfilter/nf_nat_core.c+4 -520 replies
2/3netfilter: conntrack: mark extension structs as constinclude/net/netfilter/nf_conntrack_extend.h net/netfilter/nf_conntrack_acct.c net/netfilter/nf_conntrack_ecache.c +6 more+11 -110 replies
3/3netfilter: conntrack: handle initial extension alloc via kreallocnet/netfilter/nf_conntrack_extend.c+15 -360 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 nf-next 0/3] netfilter: conntrack: removal prealloc support

The prealloc flag is only used for the nat extension (and that extension is not even needed anymore in some cases).

This removes prealloc, marks all extension structs as const and then also simplifies the initial extension allocation.

Currently (default settings), each conntrack will use 64 bytes of the initial extension allocation.

 include/net/netfilter/nf_conntrack_extend.h |   10 --
 net/netfilter/nf_conntrack_acct.c           |    2
 net/netfilter/nf_conntrack_ecache.c         |    2
 net/netfilter/nf_conntrack_extend.c         |   98 +++++-----------------------
 net/netfilter/nf_conntrack_helper.c         |    2
 net/netfilter/nf_conntrack_labels.c         |    2
 net/netfilter/nf_conntrack_seqadj.c         |    2
 net/netfilter/nf_conntrack_timeout.c        |    2
 net/netfilter/nf_conntrack_timestamp.c      |    2
 net/netfilter/nf_nat_core.c                 |    1
 10 files changed, 27 insertions(+), 96 deletions(-)