samples/bpf: xdp_monitor also record xdp_exception tracepoint
authorJesper Dangaard Brouer <brouer@redhat.com>
Fri, 6 Oct 2017 08:41:46 +0000 (10:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Oct 2017 17:04:35 +0000 (10:04 -0700)
commit280b058d4801cb431477dc101a776e4b24995f2f
tree993a220ce48d529b5b3cd71a4af56429eaf4ef1b
parentf4ce0a0116bc90803adac10865f14429313cb2b6
samples/bpf: xdp_monitor also record xdp_exception tracepoint

Also monitor the tracepoint xdp_exception.  This tracepoint is usually
invoked by the drivers.  Programs themselves can activate this by
returning XDP_ABORTED, which will drop the packet but also trigger the
tracepoint.  This is useful for distinguishing intentional (XDP_DROP)
vs. ebpf-program error cases that cased a drop (XDP_ABORTED).

Drivers also use this tracepoint for reporting on XDP actions that are
unknown to the specific driver.  This can help the user to detect if a
driver e.g. doesn't implement XDP_REDIRECT yet.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/xdp_monitor_kern.c
samples/bpf/xdp_monitor_user.c