netfilter: reduce hook array sizes to what is needed
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | netfilter: reduce hook array sizes to what is neededinclude/ net/ | +18 | 2 replies | |
| 2/3 | netfilter: don't allocate space for decnet hooks unless neededinclude/ include/ net/ | +8 | 0 replies | |
| 3/3 | netfilter: don't allocate space for arp/bridge hooks unless neededinclude/ include/ net/ +5 more | +29 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH nf-next 0/3] netfilter: reduce hook array sizes to what is needed
This series further reduces size of the hook arrays by only resevering space for the hooks that are implemented/supported (e.g., arp only supports 3 different hook points as it lacks PRE/POST_ROUTING).
Furthermore, add #ifdef guard to not declare arp/bridge/decnet hooks unless they are needed.
At least Fedora has CONFIG_DECNET=n so this even reduces size for some distro kernels.
I ran a few randconfig builds last night and it did not catch any build errors.
Florian Westphal (3):
netfilter: reduce hook array sizes to what is needed
netfilter: don't allocate space for decnet hooks unless needed
netfilter: don't allocate space for arp/bridge hooks unless needed
include/linux/netfilter.h | 6 ++++++ include/net/netns/netfilter.h | 19 ++++++++++++++----- net/Kconfig | 1 + net/bridge/netfilter/Kconfig | 2 ++ net/ipv4/netfilter/Kconfig | 2 ++ net/netfilter/Kconfig | 6 ++++++ net/netfilter/core.c | 22 ++++++++++++++++++++++ net/netfilter/nf_queue.c | 2 ++ 8 files changed, 55 insertions(+), 5 deletions(-)