public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] bpf: skb_adjust_room helper refactor and tunnel decap flags
@ 2026-03-18 13:42 Nick Hudson
  2026-03-18 13:42 ` [PATCH v2 1/5] bpf: name the enum for BPF_FUNC_skb_adjust_room flags Nick Hudson
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Nick Hudson @ 2026-03-18 13:42 UTC (permalink / raw)
  To: bpf, netdev; +Cc: Willem de Bruijn, Nick Hudson

This series refactors the bpf_skb_adjust_room() helper to support tunnel
decapsulation with L4 and IPXIP modes, in addition to the existing L3
decapsulation support.

The changes are structured as follows:
1. Name the enum for BPF_FUNC_skb_adjust_room flags
2. Add new BPF_F_ADJ_ROOM_DECAP_* flags for L4 and IPXIP decap modes
3. Introduce helper masks to simplify validation logic
4. Enable the new decap flags and add guard rails for invalid combinations
5. Clear tunnel GSO state when decapsulating in skb_adjust_room

These patches enable BPF programs to efficiently decapsulate various tunnel
encapsulation formats and properly handle GSO state transitions.

Changes v1 -> v2:
- Patch 3: Decap flag acceptance intentionally remains L3-only
  while adding the helper masks.
- Patch 4: Decap with L4/IPXIP support enabled with guard rails.

Nick Hudson (5):
  bpf: name the enum for BPF_FUNC_skb_adjust_room flags
  bpf: add BPF_F_ADJ_ROOM_DECAP_* flags for tunnel decapsulation
  bpf: add helper masks for ADJ_ROOM flags and encap validation
  bpf: allow new DECAP flags and add guard rails
  bpf: clear decap tunnel GSO state in skb_adjust_room

 include/uapi/linux/bpf.h       |  36 ++++++++++-
 net/core/filter.c              | 107 +++++++++++++++++++++++++++------
 tools/include/uapi/linux/bpf.h |  36 ++++++++++-
 3 files changed, 156 insertions(+), 23 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-03-27 10:56 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 13:42 [PATCH v2 0/5] bpf: skb_adjust_room helper refactor and tunnel decap flags Nick Hudson
2026-03-18 13:42 ` [PATCH v2 1/5] bpf: name the enum for BPF_FUNC_skb_adjust_room flags Nick Hudson
2026-03-21  0:39   ` Willem de Bruijn
2026-03-24 17:34   ` Martin KaFai Lau
2026-03-18 13:42 ` [PATCH v2 2/5] bpf: add BPF_F_ADJ_ROOM_DECAP_* flags for tunnel decapsulation Nick Hudson
2026-03-21  0:39   ` Willem de Bruijn
2026-03-18 13:42 ` [PATCH v2 3/5] bpf: add helper masks for ADJ_ROOM flags and encap validation Nick Hudson
2026-03-21  0:39   ` Willem de Bruijn
2026-03-24 18:12   ` Martin KaFai Lau
2026-03-26 17:02     ` Hudson, Nick
2026-03-26 17:49       ` Martin KaFai Lau
2026-03-27 10:55         ` Hudson, Nick
2026-03-18 13:42 ` [PATCH v2 4/5] bpf: allow new DECAP flags and add guard rails Nick Hudson
2026-03-18 20:02   ` Willem de Bruijn
2026-03-19  8:17     ` Hudson, Nick
2026-03-19 13:24       ` Willem de Bruijn
2026-03-21  0:40   ` Willem de Bruijn
2026-03-24 18:30   ` Martin KaFai Lau
2026-03-26 17:02     ` Hudson, Nick
2026-03-18 13:42 ` [PATCH v2 5/5] bpf: clear decap tunnel GSO state in skb_adjust_room Nick Hudson
2026-03-18 20:09   ` Willem de Bruijn
2026-03-18 20:01 ` [PATCH v2 0/5] bpf: skb_adjust_room helper refactor and tunnel decap flags Willem de Bruijn

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