Skip to content

netfilter: nf_tables: shrink jump stack size

Florian Westphal netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3netfilter: nf_tables: merge nft_rules_old structure and end of ruleblob markernet/netfilter/nf_tables_api.c+27 -280 replies
2/3netfilter: nf_tables: don't store address of last rule on jumpnet/netfilter/nf_tables_core.c+2 -60 replies
3/3netfilter: nf_tables: don't store chain address on jumpinclude/net/netfilter/nf_tables.h net/netfilter/nf_tables_api.c net/netfilter/nf_tables_core.c +1 more+44 -280 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/3] netfilter: nf_tables: shrink jump stack size

This series reworks nf_tables evaluation loop so that only the next rule to run after returning from the chain needs to be saved.

This reduces nft_do_chain stack usage from 600 to 328 bytes.

There is more potential for reduction of stack usage by dieting the traceinfo structure, I will look into this next.

Florian Westphal (3):
netfilter: nf_tables: merge nft_rules_old structure and end of
ruleblob marker
netfilter: nf_tables: don't store address of last rule on jump
netfilter: nf_tables: don't store chain address on jump

 include/net/netfilter/nf_tables.h | 14 ++++++--
 net/netfilter/nf_tables_api.c     | 56 +++++++++++++------------------
 net/netfilter/nf_tables_core.c    | 29 +++++-----------
 net/netfilter/nf_tables_trace.c   | 30 ++++++++++++++---
 4 files changed, 70 insertions(+), 59 deletions(-)
Signature · 1 line
2.39.2