On Mon, Oct 31, 2016 at 1:11 AM, Saeed Mahameed <sae...@dev.mellanox.co.il> wrote: > On Mon, Oct 31, 2016 at 12:44 AM, Alexei Starovoitov > <alexei.starovoi...@gmail.com> wrote: >> On Sun, Oct 30, 2016 at 06:03:06PM +0200, Tariq Toukan wrote: >>> >>> Note that the XDP TX rings are no longer shown in ethtool -S. >> >> ouch. Can you make it to show them as some large TX numbers instead? >> It would really sux to lose stats on them. >> > > Right, Tariq, how did we miss this ? > > FYI, I don't think we need the whole TX queue stats for XDP tx rings, > it is just an overkill, there are only two active counters for XDP TX > ring (XDP_TX_FWD/XDP_TX_DROP). > > XDP_TX_FWD or currently "tx_packets" will count successfully forwarded packets > XDP_TX_DROP or currently "tx_dropped" will count TX dropped packets > due to full ring. > > do we need tx_bytes as well ? I think yes. > > The whole idea of this refactoring i.e. differentiating between TXQ > netdev rings and XDP TX rings, that XDP is a fast path with minimal > system overhead, we don't need to have the full set of regular TXQ > counters for XDP TX rings.
BTW in mlx5 we have the required xdp stats as a part of the rx ring, static const struct counter_desc rq_stats_desc[] = { [...] { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, xdp_drop) }, { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, xdp_tx) }, { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, xdp_tx_full) }, [...] We should do the same here.