DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Lyulin <lyulin.2003@mail.ru>
To: Kishore Padmanabha <kishore.padmanabha@broadcom.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Manish Kurup <manish.kurup@broadcom.com>,
	Shuanglin Wang <shuanglin.wang@broadcom.com>,
	Randy Schacher <stuart.schacher@broadcom.com>
Cc: dev@dpdk.org, stable@dpdk.org, Denis Lyulin <lyulin.2003@mail.ru>
Subject: [PATCH] net/bnxt: fix memset size mismatch in Tx queue start
Date: Thu, 16 Apr 2026 12:02:51 +0300	[thread overview]
Message-ID: <20260416090252.2211405-1-lyulin.2003@mail.ru> (raw)

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


             reply	other threads:[~2026-04-24  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  9:02 Denis Lyulin [this message]
2026-04-17 16:33 ` [PATCH] net/bnxt: fix memset size mismatch in Tx queue start Kishore Padmanabha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260416090252.2211405-1-lyulin.2003@mail.ru \
    --to=lyulin.2003@mail.ru \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=kishore.padmanabha@broadcom.com \
    --cc=manish.kurup@broadcom.com \
    --cc=shuanglin.wang@broadcom.com \
    --cc=stable@dpdk.org \
    --cc=stuart.schacher@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox