net/mana: fix stats for txq bytes sent
Checks
Commit Message
From: Long Li <longli@microsoft.com>
Bytes should be calculated using the packet length, not the mbuf segment
data length.
Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/net/mana/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 7/20/2023 11:42 PM, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
>
> Bytes should be calculated using the packet length, not the mbuf segment
> data length.
>
> Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
> Cc: stable@dpdk.org
>
> Signed-off-by: Long Li <longli@microsoft.com>
>
Applied to dpdk-next-net/main, thanks.
@@ -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);
}