bpf: Add bpf_xdp_output() helper
authorEelco Chaudron <echaudro@redhat.com>
Fri, 6 Mar 2020 08:59:23 +0000 (08:59 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 13 Mar 2020 00:47:38 +0000 (17:47 -0700)
commitd831ee84bfc9173eecf30dbbc2553ae81b996c60
tree52c110beaf9330261d28ed885ea246cb66e39ee8
parent4823b7210b90a10b88b0c56198f894b27a767509
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
include/uapi/linux/bpf.h
kernel/bpf/verifier.c
kernel/trace/bpf_trace.c
net/core/filter.c
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/prog_tests/xdp_bpf2bpf.c
tools/testing/selftests/bpf/progs/test_xdp_bpf2bpf.c