Skip to content

net: flow dissector: allow explicit passing of netns

Florian Westphal netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesApplied 2/2
  2. v12 patches 5 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: add and use skb_get_hash_netinclude/linux/skbuff.h net/core/flow_dissector.c net/netfilter/nf_tables_trace.c+22 -70 repliesApplied
2/2net: add and use __skb_get_hash_symmetric_netinclude/linux/skbuff.h net/core/flow_dissector.c net/netfilter/nft_hash.c+12 -50 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric DumazetWillem de Bruijn
SeriesR-b
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/2] net: flow dissector: allow explicit passing of netns

Change since last version:
fix kdoc comment warning reported by kbuild robot, no other changes, thus retaining RvB tags from Eric and Willem.
v1: https://lore.kernel.org/netdev/[email protected]/

Years ago flow dissector gained ability to delegate flow dissection to a bpf program, scoped per netns.

The netns is derived from skb->dev, and if that is not available, from skb->sk. If neither is set, we hit a (benign) WARN_ON_ONCE().

This WARN_ON_ONCE can be triggered from netfilter. Known skb origins are nf_send_reset and ipv4 stack generated IGMP messages.

Lets allow callers to pass the current netns explicitly and make nf_tables use those instead.

This targets net-next instead of net because the WARN is benign and this is not a regression.

Florian Westphal (2):
net: add and use skb_get_hash_net
net: add and use __skb_get_hash_symmetric_net

 include/linux/skbuff.h          | 20 +++++++++++++++++---
 net/core/flow_dissector.c       | 21 ++++++++++++++-------
 net/netfilter/nf_tables_trace.c |  2 +-
 net/netfilter/nft_hash.c        |  3 ++-
 4 files changed, 34 insertions(+), 12 deletions(-)
Signature · 1 line
2.44.2