All of 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

* Re: [PATCH] net/bnxt: fix memset size mismatch in Tx queue start
  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>
  0 siblings, 1 reply; 3+ messages in thread
From: Kishore Padmanabha @ 2026-04-17 16:33 UTC (permalink / raw)
  To: Denis Lyulin
  Cc: Ajit Khaparde, Manish Kurup, Shuanglin Wang, Randy Schacher, dev,
	stable


[-- Attachment #1.1: Type: text/plain, Size: 1440 bytes --]

On Thu, Apr 16, 2026 at 5:03 AM Denis Lyulin <lyulin.2003@mail.ru> wrote:

> 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>
>
Acked-by:  Kishore Padmanabha <kishore.padmanabha@broadcom.com>

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

[-- Attachment #1.2: Type: text/html, Size: 2687 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5493 bytes --]

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

* RE: [PATCH] net/bnxt: fix memset size mismatch in Tx queue start
       [not found]   ` <1784799305.659637239@f128.i.mail.ru>
@ 2026-07-23 15:26     ` Kishore Padmanabha
  0 siblings, 0 replies; 3+ messages in thread
From: Kishore Padmanabha @ 2026-07-23 15:26 UTC (permalink / raw)
  To: Денис Люлин
  Cc: Ajit Kumar Khaparde, Manish Kurup, Shuanglin Wang, Randy Schacher,
	dev, stable


[-- Attachment #1.1: Type: text/plain, Size: 2146 bytes --]

Hi Denis,



I have accepted the change and post it for merging the change.



Thanks,

Kishore





*From:* Денис Люлин <lyulin.2003@mail.ru>
*Sent:* Thursday, July 23, 2026 5:35 AM
*To:* Kishore Padmanabha <kishore.padmanabha@broadcom.com>
*Cc:* Ajit Khaparde <ajit.khaparde@broadcom.com>; Manish Kurup <
manish.kurup@broadcom.com>; Shuanglin Wang <shuanglin.wang@broadcom.com>;
Randy Schacher <stuart.schacher@broadcom.com>; dev@dpdk.org; stable@dpdk.org
*Subject:* Re: [PATCH] net/bnxt: fix memset size mismatch in Tx queue start



Kindly reminder
Sorry, But nobody has reviewed my patch on Patchwork
https://patches.dpdk.org/project/dpdk/patch/20260416090252.2211405-1-lyulin.2003@mail.ru/
Could you please review this?



On Thu, Apr 16, 2026 at 5:03 AM Denis Lyulin <lyulin.2003@mail.ru> wrote:

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>

Acked-by:  Kishore Padmanabha <kishore.padmanabha@broadcom.com>

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

[-- Attachment #1.2: Type: text/html, Size: 5955 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5493 bytes --]

^ 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.