From f5cbac8bbd993d6ac67514b6177115b5bc6e7789 Mon Sep 17 00:00:00 2001
From: Amit Bernstein <amitbern@amazon.com>
Date: Tue, 26 Jan 2021 19:32:23 +0100
Subject: [PATCH 49/72] net/ena: fix Tx doorbell statistics

Increment Tx doorbell statistics on tx_pkt_burst
after writing to doorbell and in case max burst size achieved

Fixes: c7519ea5eb8d ("net/ena: call additional doorbells if needed")
Cc: stable@dpdk.org

Signed-off-by: Amit Bernstein <amitbern@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index b788d572da..193f3e9f91 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2542,6 +2542,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
 			"llq tx max burst size of queue %d achieved, writing doorbell to send burst\n",
 			tx_ring->id);
 		ena_com_write_sq_doorbell(tx_ring->ena_com_io_sq);
+		tx_ring->tx_stats.doorbells++;
 	}
 
 	/* prepare the packet's descriptors to dma engine */
-- 
2.25.1

