[PATCH bpf-next,v3 0/2] Clarify and Enhance XDP Rx Metadata Handling

Song Yoong Siang posted 2 patches 3 months, 1 week ago
Documentation/networking/xdp-rx-metadata.rst  | 36 +++++++++++++++----
.../selftests/bpf/prog_tests/xdp_metadata.c   |  2 +-
.../selftests/bpf/progs/xdp_hw_metadata.c     |  2 +-
.../selftests/bpf/progs/xdp_metadata.c        |  2 +-
tools/testing/selftests/bpf/xdp_hw_metadata.c |  2 +-
tools/testing/selftests/bpf/xdp_metadata.h    |  7 ++++
6 files changed, 41 insertions(+), 10 deletions(-)
[PATCH bpf-next,v3 0/2] Clarify and Enhance XDP Rx Metadata Handling
Posted by Song Yoong Siang 3 months, 1 week ago
This patch set improves the documentation and selftests for XDP Rx metadata
handling. The first patch clarifies the documentation around XDP metadata
layout and METADATA_SIZE. The second patch enhances the BPF selftests to
make XDP metadata handling more robust across different NICs.

Prior to this patch set, the XDP program might accidentally overwrite the
device-reserved metadata.

V3:
  - update doc and commit msg accordingly.

V2: https://lore.kernel.org/netdev/20250702030349.3275368-1-yoong.siang.song@intel.com/
  - unconditionally do bpf_xdp_adjust_meta with -XDP_METADATA_SIZE (Stanislav)

V1: https://lore.kernel.org/netdev/20250701042940.3272325-1-yoong.siang.song@intel.com/

Song Yoong Siang (2):
  doc: enhance explanation of XDP Rx metadata layout and METADATA_SIZE
  selftests/bpf: Enhance XDP Rx metadata handling

 Documentation/networking/xdp-rx-metadata.rst  | 36 +++++++++++++++----
 .../selftests/bpf/prog_tests/xdp_metadata.c   |  2 +-
 .../selftests/bpf/progs/xdp_hw_metadata.c     |  2 +-
 .../selftests/bpf/progs/xdp_metadata.c        |  2 +-
 tools/testing/selftests/bpf/xdp_hw_metadata.c |  2 +-
 tools/testing/selftests/bpf/xdp_metadata.h    |  7 ++++
 6 files changed, 41 insertions(+), 10 deletions(-)

-- 
2.34.1
Re: [PATCH bpf-next,v3 0/2] Clarify and Enhance XDP Rx Metadata Handling
Posted by Stanislav Fomichev 3 months ago
On 07/03, Song Yoong Siang wrote:
> This patch set improves the documentation and selftests for XDP Rx metadata
> handling. The first patch clarifies the documentation around XDP metadata
> layout and METADATA_SIZE. The second patch enhances the BPF selftests to
> make XDP metadata handling more robust across different NICs.
> 
> Prior to this patch set, the XDP program might accidentally overwrite the
> device-reserved metadata.
> 
> V3:
>   - update doc and commit msg accordingly.
> 
> V2: https://lore.kernel.org/netdev/20250702030349.3275368-1-yoong.siang.song@intel.com/
>   - unconditionally do bpf_xdp_adjust_meta with -XDP_METADATA_SIZE (Stanislav)
> 
> V1: https://lore.kernel.org/netdev/20250701042940.3272325-1-yoong.siang.song@intel.com/

Acked-by: Stanislav Fomichev <sdf@fomichev.me>