From: Rafal Kozik Date: Tue, 14 May 2019 11:11:26 +0000 (+0200) Subject: net/ena: fix Tx statistics X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5673e285a63347068e51dbd191915348f6a580b0;p=dpdk.git net/ena: fix Tx statistics Instead of counting number of used NIC Tx bufs just count number of Tx packets. Fixes: 45b6d86184fc ("net/ena: add per-queue software counters stats") Cc: stable@dpdk.org Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index ad9b131894..ffecdb8693 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2376,7 +2376,7 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, tx_info->tx_descs = nb_hw_desc; next_to_use++; - tx_ring->tx_stats.cnt += tx_info->num_of_bufs; + tx_ring->tx_stats.cnt++; tx_ring->tx_stats.bytes += total_length; } tx_ring->tx_stats.available_desc =