net/mlx4_en: Add ethtool statistics for XDP cases
authorTariq Toukan <tariqt@mellanox.com>
Wed, 2 Nov 2016 15:12:25 +0000 (17:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Nov 2016 19:07:11 +0000 (15:07 -0400)
commit15fca2c8eb4166123a3edbd151765b00af190b75
tree6a9ae9e95a2d8b1eb15ec845b07c421f3e819c87
parent67f8b1dcb9ee7f1e165da4eb2ec53483a6b141ea
net/mlx4_en: Add ethtool statistics for XDP cases

XDP statistics are reported in ethtool, in total and per ring,
as follows:
- xdp_drop: the number of packets dropped by xdp.
- xdp_tx: the number of packets forwarded by xdp.
- xdp_tx_full: the number of times an xdp forward failed
due to a full tx xdp ring.

In addition, all packets that are dropped/forwarded by XDP
are no longer accounted in rx_packets/rx_bytes of the ring,
so that they count traffic that is passed to the stack.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_port.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h