This patchset adds support for non-linear skbs when running tc programs with BPF_PROG_TEST_RUN. We've had multiple bugs in the past few years in Cilium caused by missing calls to bpf_skb_pull_data(). Daniel suggested this new BPF_PROG_TEST_RUN flag as a way to uncover these bugs in our BPF tests. Paul Chaignon (4): bpf: Refactor cleanup of bpf_prog_test_run_skb bpf: Craft non-linear skbs in BPF_PROG_TEST_RUN selftests/bpf: Support non-linear flag in test loader selftests/bpf: Test direct packet access on non-linear skbs include/uapi/linux/bpf.h | 2 + net/bpf/test_run.c | 103 ++++++++++++------ tools/include/uapi/linux/bpf.h | 2 + .../bpf/progs/verifier_direct_packet_access.c | 48 ++++++++ tools/testing/selftests/bpf/test_loader.c | 9 +- 5 files changed, 129 insertions(+), 35 deletions(-) -- 2.43.0