netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf v3 0/2] support SKF_NET_OFF and SKF_LL_OFF on skb frags
@ 2025-04-08 13:27 Willem de Bruijn
  2025-04-08 13:27 ` [PATCH bpf v3 1/2] bpf: " Willem de Bruijn
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Willem de Bruijn @ 2025-04-08 13:27 UTC (permalink / raw)
  To: bpf; +Cc: netdev, ast, daniel, john.fastabend, sdf, Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

Address a longstanding issue that may lead to missed packets
depending on system configuration.

Ensure that reading from packet contents works regardless of skb
geometry, also when using the special SKF_.. negative offsets to
offset from L2 or L3 header.

Patch 2 is the selftest for the fix.

v2->v3
  - do not remove bpf_internal_load_pointer_neg_helper, because it
    is still used in the sparc32 JIT

v1->v2
  - introduce bfp_skb_load_helper_convert_offset to avoid open
    coding
  - selftest: add comment why early demux must be disabled

v2: https://lore.kernel.org/netdev/20250404142633.1955847-1-willemdebruijn.kernel@gmail.com/
v1: https://lore.kernel.org/netdev/20250403140846.1268564-1-willemdebruijn.kernel@gmail.com/

Willem de Bruijn (2):
  bpf: support SKF_NET_OFF and SKF_LL_OFF on skb frags
  selftests/net: test sk_filter support for SKF_NET_OFF on frags

 net/core/filter.c                          |  80 ++++---
 tools/testing/selftests/net/.gitignore     |   1 +
 tools/testing/selftests/net/Makefile       |   2 +
 tools/testing/selftests/net/skf_net_off.c  | 244 +++++++++++++++++++++
 tools/testing/selftests/net/skf_net_off.sh |  30 +++
 5 files changed, 321 insertions(+), 36 deletions(-)
 create mode 100644 tools/testing/selftests/net/skf_net_off.c
 create mode 100755 tools/testing/selftests/net/skf_net_off.sh

-- 
2.49.0.504.g3bcea36a83-goog


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

end of thread, other threads:[~2025-04-10  3:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 13:27 [PATCH bpf v3 0/2] support SKF_NET_OFF and SKF_LL_OFF on skb frags Willem de Bruijn
2025-04-08 13:27 ` [PATCH bpf v3 1/2] bpf: " Willem de Bruijn
2025-04-09 14:05   ` Stanislav Fomichev
2025-04-08 13:27 ` [PATCH bpf v3 2/2] selftests/net: test sk_filter support for SKF_NET_OFF on frags Willem de Bruijn
2025-04-10  3:10 ` [PATCH bpf v3 0/2] support SKF_NET_OFF and SKF_LL_OFF on skb frags patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).