aboutsummaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdp_sample_pkts_kern.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-24samples: bpf: Do not define bpf_printk macroMichal Rostecki1-7/+0
The bpf_printk macro was moved to bpf_helpers.h which is included in all example programs. Signed-off-by: Michal Rostecki <mrostecki@opensuse.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-06-27samples/bpf: Add xdp_sample_pkts exampleToke Høiland-Jørgensen1-0/+66
Add an example program showing how to sample packets from XDP using the perf event buffer. The example userspace program just prints the ethernet header for every packet sampled. Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>