In DPDK, unsent packets in a burst due to ring exhaustion are returned
to the application. Such packets should not be counted as errors, as
they were not dropped, and the packets themselves have no errors.
gve_tx_burst_dqo() erroneously counts such packets as oerrors,
artificially inflating the statistic.
Count only packets actually dropped and freed by the driver
(nb_tx - nb_sent) in errors.
Fixes: 98e3bbc9159b ("net/gve: support basic stats for DQO")
Cc: [email protected]
Signed-off-by: Joshua Washington <[email protected]>
Reviewed-by: Jasper Tran O'Leary <[email protected]>
---
drivers/net/gve/gve_tx_dqo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index 72730eb1c5..db432fd2f6 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -480,7 +480,7 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
txq->stats.packets += nb_sent;
txq->stats.bytes += bytes;
- txq->stats.errors += nb_pkts - nb_sent;
+ txq->stats.errors += nb_tx - nb_sent;
}
return nb_tx;
--
2.56.1.915.g69d5ec7298-goog