[3/3] net/gve: add standard and extended statistics

Message ID 20230215101052.35280-1-levendsayar@gmail.com (mailing list archive)
State Superseded, archived
Headers
Series None |

Checks

Context Check Description
ci/iol-testing warning apply patch failure
ci/Intel-compilation warning apply issues

Commit Message

Levend Sayar Feb. 15, 2023, 10:10 a.m. UTC
  TX side statistics is updated

Signed-off-by: Levend Sayar <levendsayar@gmail.com>
---
 drivers/net/gve/gve_tx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/drivers/net/gve/gve_tx.c b/drivers/net/gve/gve_tx.c
index d4e52e3ea5..5c8a3b4379 100644
--- a/drivers/net/gve/gve_tx.c
+++ b/drivers/net/gve/gve_tx.c
@@ -364,11 +364,11 @@  gve_tx_burst_qpl(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		rte_write32(rte_cpu_to_be_32(tx_tail), txq->qtx_tail);
 		txq->tx_tail = tx_tail;
 		txq->sw_tail = sw_id;
-	}
 
-	/* update stats */
-	txq->packets += nb_tx;
-	txq->bytes += total_len;
+		/* update stats */
+		txq->packets += nb_tx;
+		txq->bytes += total_len;
+	}
 
 	return nb_tx;
 }