Skip to content

netfilter: code refine for using new interface 'list_for_each_entry_continue_rcu'

Michael Wang lkml netdev netfilter netfilter-devel 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2netfilter: pass 'nf_hook_ops' instead of 'list_head' to nf_iterate()net/netfilter/core.c net/netfilter/nf_internals.h net/netfilter/nf_queue.c+14 -181 reply
2/2netfilter: pass 'nf_hook_ops' instead of 'list_head' to nf_queue()net/netfilter/core.c net/netfilter/nf_internals.h net/netfilter/nf_queue.c+7 -71 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] netfilter: code refine for using new interface 'list_for_each_entry_continue_rcu'

From: Michael Wang <[email protected]>

Since 'list_for_each_continue_rcu' has been replaced with the new interface 'list_for_each_entry_continue_rcu' by commit 6705e86, we can no longer saving code by passing 'list_head' to nf_iterate() and nf_queue() any more.

This patch set will pass 'nf_hook_ops' instead of 'list_head' to nf_iterate() and nf_queue() as the parameter and saving some code.

Tested:
add rule to iptables and check result by ping. nfqnl_test which is a test utility of libnetfilter_queue.

---
 b/net/netfilter/core.c         |   24 ++++++++++--------------
 b/net/netfilter/nf_internals.h |    2 +-
 b/net/netfilter/nf_queue.c     |    6 +++---
 net/netfilter/core.c           |    4 ++--
 net/netfilter/nf_internals.h   |    2 +-
 net/netfilter/nf_queue.c       |    8 ++++----
 6 files changed, 21 insertions(+), 25 deletions(-)