[PATCH v3 0/5] BPF enhancements

Stephen Hemminger stephen at networkplumber.org
Sat Nov 1 19:04:42 CET 2025


This is a series of fixes and tests for BPF functionality.
The new tests for Tx and Rx filtering require the infrastructure
to build a bpf program (clang) and the tool to convert object
file to header (xxd). If missing the test will get skipped.

It is disappointing that there were no examples or tests when
the code was submitted.

v3 - do not depend on xxd -n flag which is not present on versions
     before Oct 2024

Stephen Hemminger (5):
  bpf: add allocation annotations to functions
  bpf: use bulk free on filtered packets
  bpf: add a test for BPF ELF load
  bpf: add test for Rx and Tx filtering
  bpf: remove use of VLA

 app/test/bpf/filter.c    |  53 +++++
 app/test/bpf/load.c      |  62 ++++++
 app/test/bpf/meson.build |  53 +++++
 app/test/meson.build     |   2 +
 app/test/test_bpf.c      | 451 +++++++++++++++++++++++++++++++++++++++
 lib/bpf/bpf_pkt.c        |  84 ++++----
 lib/bpf/meson.build      |   2 -
 lib/bpf/rte_bpf.h        |  11 +-
 8 files changed, 677 insertions(+), 41 deletions(-)
 create mode 100644 app/test/bpf/filter.c
 create mode 100644 app/test/bpf/load.c
 create mode 100644 app/test/bpf/meson.build

-- 
2.51.0



More information about the dev mailing list