net/mana: fix stats for txq bytes sent
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")
Signed-off-by Long Li <[email protected]>
--- drivers/net/mana/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mana/tx.c +1 -1
@@ -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
Ferruh Yigit
AppliedQuoted 10 lines · On 7/20/2023 11:42 PM, [email protected] wrote:
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")Signed-off-by Long Li <[email protected]>
Applied to dpdk-next-net/main, thanks.