Skip to contentSkip to conversation

net/mana: fix stats for txq bytes sent

PATCH Applied [email protected] 2 participants 2 messages Jul 20, 2023 – Jul 21, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mana: fix stats for txq bytes sent

From: Long Li <[email protected]>

Bytes should be calculated using the packet length, not the mbuf segment data length.

Fixes 517ed6e2d590 ("net/mana: add basic driver with build environment")
---
 drivers/net/mana/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mana/tx.c +1 -1
index 5947efbe8d..11ba2ee1ac 100644
@@ -201,7 +201,7 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		if (!desc->pkt) {
 			DP_LOG(ERR, "mana_txq_desc has a NULL pkt");
 		} else {
-			txq->stats.bytes += desc->pkt->data_len;
+			txq->stats.bytes += desc->pkt->pkt_len;
 			rte_pktmbuf_free(desc->pkt);
 		}
 
Signature · 1 line
2.34.1