DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix memset size mismatch in Tx queue start
@ 2026-04-16  9:02 Denis Lyulin
  2026-04-17 16:33 ` Kishore Padmanabha
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Lyulin @ 2026-04-16  9:02 UTC (permalink / raw)
  To: Kishore Padmanabha, Ajit Khaparde, Manish Kurup, Shuanglin Wang,
	Randy Schacher
  Cc: dev, stable, Denis Lyulin

When the tx_queue is started, previous stats are reset.
For tpa_v2 and P7, extended stats structure is used:
`struct bnxt_ring_stats_ext`, so passing wrong size to memset
makes not all stats to be reset. This commit sets correct size of
the structure passed to memset when zeroing-out previous stats.

Fixes: dd0191d5e70d ("net/bnxt/tf_ulp: support Thor2 ULP layer")
Cc: shuanglin.wang@broadcom.com
Cc: stable@dpdk.org

Signed-off-by: Denis Lyulin <lyulin.2003@mail.ru>
---
 drivers/net/bnxt/bnxt_txr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 27758898b0..b6ad37f872 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -729,7 +729,7 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	 */
 	if (BNXT_TPA_V2_P7(bp))
 		memset(&bp->prev_tx_ring_stats_ext[tx_queue_id], 0,
-		       sizeof(struct bnxt_ring_stats));
+		       sizeof(struct bnxt_ring_stats_ext));
 	else
 		memset(&bp->prev_tx_ring_stats[tx_queue_id], 0,
 		       sizeof(struct bnxt_ring_stats));
-- 
2.34.1


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

end of thread, other threads:[~2026-07-23 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16  9:02 [PATCH] net/bnxt: fix memset size mismatch in Tx queue start Denis Lyulin
2026-04-17 16:33 ` Kishore Padmanabha
     [not found]   ` <1784799305.659637239@f128.i.mail.ru>
2026-07-23 15:26     ` Kishore Padmanabha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox