]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: xdp_monitor include cpumap tracepoints in monitoring
authorJesper Dangaard Brouer <brouer@redhat.com>
Fri, 19 Jan 2018 16:15:50 +0000 (17:15 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 20 Jan 2018 01:10:55 +0000 (02:10 +0100)
commit1c0f038cdd8a9f28a32b26638fc356edc68d6897
tree73baaad473d32b2cb33f264a6e3f064126a5d495
parent34ce77d2fd819b04f10f6b28b2ba9b0cb752eb0e
samples/bpf: xdp_monitor include cpumap tracepoints in monitoring

The xdp_redirect_cpu sample have some "builtin" monitoring of the
tracepoints for xdp_cpumap_*, but it is practical to have an external
tool that can monitor these transpoint as an easy way to troubleshoot
an application using XDP + cpumap.

Specifically I need such external tool when working on Suricata and
XDP cpumap redirect. Extend the xdp_monitor tool sample with
monitoring of these xdp_cpumap_* tracepoints.  Model the output format
like xdp_redirect_cpu.

Given I needed to handle per CPU decoding for cpumap, this patch also
add per CPU info on the existing monitor events.  This resembles part
of the builtin monitoring output from sample xdp_rxq_info.  Thus, also
covering part of that sample in an external monitoring tool.

Performance wise, the cpumap tracepoints uses bulking, which cause
them to have very little overhead.  Thus, they are enabled by default.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/xdp_monitor_kern.c
samples/bpf/xdp_monitor_user.c