bpf: Add bpf_xdp_output() helper
Introduce new helper that reuses existing xdp perf_event output implementation, but can be called from raw_tracepoint programs that receive 'struct xdp_buff *' as a tracepoint argument. Signed-off-by:Eelco Chaudron <echaudro@redhat.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Acked-by:
John Fastabend <john.fastabend@gmail.com> Acked-by:
Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/bpf/158348514556.2239.11050972434793741444.stgit@xdp-tutorial
Showing
- include/uapi/linux/bpf.h 25 additions, 1 deletioninclude/uapi/linux/bpf.h
- kernel/bpf/verifier.c 3 additions, 1 deletionkernel/bpf/verifier.c
- kernel/trace/bpf_trace.c 3 additions, 0 deletionskernel/trace/bpf_trace.c
- net/core/filter.c 15 additions, 1 deletionnet/core/filter.c
- tools/include/uapi/linux/bpf.h 25 additions, 1 deletiontools/include/uapi/linux/bpf.h
- tools/testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c 53 additions, 0 deletionstools/testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c
- tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c 24 additions, 0 deletionstools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c
Loading
Please register or sign in to comment