]> www.infradead.org Git - users/hch/misc.git/commitdiff
Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf...
authorJakub Kicinski <kuba@kernel.org>
Wed, 24 Sep 2025 17:21:39 +0000 (10:21 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 24 Sep 2025 17:22:37 +0000 (10:22 -0700)
Martin KaFai Lau says:

====================
pull-request: bpf-next 2025-09-23

We've added 9 non-merge commits during the last 33 day(s) which contain
a total of 10 files changed, 480 insertions(+), 53 deletions(-).

The main changes are:

1) A new bpf_xdp_pull_data kfunc that supports pulling data from
   a frag into the linear area of a xdp_buff, from Amery Hung.

   This includes changes in the xdp_native.bpf.c selftest, which
   Nimrod's future work depends on.

   It is a merge from a stable branch 'xdp_pull_data' which has
   also been merged to bpf-next.

   There is a conflict with recent changes in 'include/net/xdp.h'
   in the net-next tree that will need to be resolved.

2) A compiler warning fix when CONFIG_NET=n in the recent dynptr
   skb_meta support, from Jakub Sitnicki.

* tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next:
  selftests: drv-net: Pull data before parsing headers
  selftests/bpf: Test bpf_xdp_pull_data
  bpf: Support specifying linear xdp packet data size for BPF_PROG_TEST_RUN
  bpf: Make variables in bpf_prog_test_run_xdp less confusing
  bpf: Clear packet pointers after changing packet data in kfuncs
  bpf: Support pulling non-linear xdp data
  bpf: Allow bpf_xdp_shrink_data to shrink a frag from head and tail
  bpf: Clear pfmemalloc flag when freeing all fragments
  bpf: Return an error pointer for skb metadata when CONFIG_NET=n
====================

Link: https://patch.msgid.link/20250924050303.2466356-1-martin.lau@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1  2 
include/net/xdp.h
kernel/bpf/verifier.c
net/core/filter.c

index 6fd294fa6841d59c3d7dc4475e09e731996566b0,f288c348a6c13226903e705119b0df2045662c7d..aa742f413c358575396530879af4570dc3fc18de
@@@ -121,21 -104,22 +121,26 @@@ static __always_inline void xdp_buff_cl
        xdp->flags &= ~XDP_FLAGS_HAS_FRAGS;
  }
  
 -static __always_inline bool
 -xdp_buff_is_frag_pfmemalloc(const struct xdp_buff *xdp)
 +static __always_inline void xdp_buff_set_frag_pfmemalloc(struct xdp_buff *xdp)
  {
 -      return !!(xdp->flags & XDP_FLAGS_FRAGS_PF_MEMALLOC);
 +      xdp->flags |= XDP_FLAGS_FRAGS_PF_MEMALLOC;
  }
  
 -static __always_inline void xdp_buff_set_frag_pfmemalloc(struct xdp_buff *xdp)
 +static __always_inline void xdp_buff_set_frag_unreadable(struct xdp_buff *xdp)
  {
 -      xdp->flags |= XDP_FLAGS_FRAGS_PF_MEMALLOC;
 +      xdp->flags |= XDP_FLAGS_FRAGS_UNREADABLE;
 +}
 +
 +static __always_inline u32 xdp_buff_get_skb_flags(const struct xdp_buff *xdp)
 +{
 +      return xdp->flags;
  }
  
+ static __always_inline void xdp_buff_clear_frag_pfmemalloc(struct xdp_buff *xdp)
+ {
+       xdp->flags &= ~XDP_FLAGS_FRAGS_PF_MEMALLOC;
+ }
  static __always_inline void
  xdp_init_buff(struct xdp_buff *xdp, u32 frame_sz, struct xdp_rxq_info *rxq)
  {
Simple merge
Simple merge