xdp: adjust xdp redirect tracepoint to include return error code
authorJesper Dangaard Brouer <brouer@redhat.com>
Thu, 17 Aug 2017 16:22:37 +0000 (18:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Aug 2017 23:18:40 +0000 (16:18 -0700)
commit4c03bdd7b5c084c3c6973cb2419edac5363c051f
tree77e091a3b5de3c55433947ec41891ba2b1e52019
parentd2cee2e5d0106abb5da25f393b3c50e0bb01f7f9
xdp: adjust xdp redirect tracepoint to include return error code

The return error code need to be included in the tracepoint
xdp:xdp_redirect, else its not possible to distinguish successful or
failed XDP_REDIRECT transmits.

XDP have no queuing mechanism. Thus, it is fairly easily to overrun a
NIC transmit queue.  The eBPF program invoking helpers (bpf_redirect
or bpf_redirect_map) to redirect a packet doesn't get any feedback
whether the packet was actually transmitted.

Info on failed transmits in the tracepoint xdp:xdp_redirect, is
interesting as this opens for providing a feedback-loop to the
receiving XDP program.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/trace/events/xdp.h
net/core/filter.c