summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Kozik <rk@semihalf.com>2019-05-14 13:11:26 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-06-13 23:54:29 +0900
commit5673e285a63347068e51dbd191915348f6a580b0 (patch)
tree2e5c9afcd0d34c23562f887f19c60c9412f93ea5
parent09c7e63a71f9f2a31efd7e94458019ea4dc427b6 (diff)
downloaddpdk-5673e285a63347068e51dbd191915348f6a580b0.zip
dpdk-5673e285a63347068e51dbd191915348f6a580b0.tar.gz
dpdk-5673e285a63347068e51dbd191915348f6a580b0.tar.xz
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 <rk@semihalf.com> Acked-by: Michal Krawczyk <mk@semihalf.com>
-rw-r--r--drivers/net/ena/ena_ethdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index ad9b131..ffecdb8 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 =