DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mana: fix stats for txq bytes sent
@ 2023-07-20 22:42 longli
  2023-07-21  9:54 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: longli @ 2023-07-20 22:42 UTC (permalink / raw)
  To: Ferruh Yigit, Andrew Rybchenko; +Cc: dev, Ajay Sharma, Long Li, stable

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(-)

diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c
index 5947efbe8d..11ba2ee1ac 100644
--- a/drivers/net/mana/tx.c
+++ b/drivers/net/mana/tx.c
@@ -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);
 		}
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/mana: fix stats for txq bytes sent
  2023-07-20 22:42 [PATCH] net/mana: fix stats for txq bytes sent longli
@ 2023-07-21  9:54 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-07-21  9:54 UTC (permalink / raw)
  To: longli, Andrew Rybchenko; +Cc: dev, Ajay Sharma, Long Li, stable

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-21  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 22:42 [PATCH] net/mana: fix stats for txq bytes sent longli
2023-07-21  9:54 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).