public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: flow dissector: allow explicit passing of netns
@ 2024-06-08 22:10 Florian Westphal
  2024-06-08 22:10 ` [PATCH net-next v2 1/2] net: add and use skb_get_hash_net Florian Westphal
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Florian Westphal @ 2024-06-08 22:10 UTC (permalink / raw)
  To: netdev
  Cc: Paolo Abeni, David S. Miller, Eric Dumazet, Jakub Kicinski,
	willemb, pablo

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/20240607083205.3000-1-fw@strlen.de/

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(-)

-- 
2.44.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-27 10:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-08 22:10 [PATCH net-next v2 0/2] net: flow dissector: allow explicit passing of netns Florian Westphal
2024-06-08 22:10 ` [PATCH net-next v2 1/2] net: add and use skb_get_hash_net Florian Westphal
2024-06-08 22:10 ` [PATCH net-next v2 2/2] net: add and use __skb_get_hash_symmetric_net Florian Westphal
2024-06-09  5:06 ` [PATCH net-next v2 0/2] net: flow dissector: allow explicit passing of netns Eric Dumazet
2024-06-12 22:00 ` patchwork-bot+netdevbpf
2024-06-26 23:49 ` Pablo Neira Ayuso
2024-06-27 10:20   ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox