]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: trace_xdp_exception on XDP failure
authorArthur Fabre <afabre@cloudflare.com>
Tue, 12 Nov 2019 15:36:01 +0000 (15:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Nov 2019 20:23:40 +0000 (12:23 -0800)
commit83c171ec9fb03da0662e42504172e7c97916d3ec
tree043f63c5c908fb47fd7e338308291bc0d4a37432
parenta41f38c9666f40d7b0940f635c0bac0b93bc0c4b
sfc: trace_xdp_exception on XDP failure

The sfc driver can drop packets processed with XDP, notably when running
out of buffer space on XDP_TX, or returning an unknown XDP action.
This increments the rx_xdp_bad_drops ethtool counter.

Call trace_xdp_exception everywhere rx_xdp_bad_drops is incremented,
except for fragmented RX packets as the XDP program hasn't run yet.
This allows it to easily be monitored from userspace.

This mirrors the behavior of other drivers.

Signed-off-by: Arthur Fabre <afabre@cloudflare.com>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/rx.c