DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] bnxt PMD fixes
@ 2023-02-01  4:20 Kalesh A P
  2023-02-01  4:20 ` [dpdk-dev] [PATCH 1/3] net/bnxt: fix Tx queue stats after queue stop and start Kalesh A P
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kalesh A P @ 2023-02-01  4:20 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

This patchset contains bnxt PMD bug fixes. Please apply.

Kalesh AP (1):
  net/bnxt: fix Tx queue stats after queue stop and start

Mike Baucom (1):
  net/bnxt: fix Rx queue stats after queue stop and start

Venkat Duvvuru (1):
  net/bnxt: do not corrupt RSS hash value in the mbuf

 drivers/net/bnxt/bnxt_rxq.c | 6 ++++++
 drivers/net/bnxt/bnxt_rxr.c | 1 -
 drivers/net/bnxt/bnxt_txr.c | 6 ++++++
 3 files changed, 12 insertions(+), 1 deletion(-)

-- 
2.10.1


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

* [dpdk-dev] [PATCH 1/3] net/bnxt: fix Tx queue stats after queue stop and start
  2023-02-01  4:20 [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Kalesh A P
@ 2023-02-01  4:20 ` Kalesh A P
  2023-02-01  4:20 ` [dpdk-dev] [PATCH 2/3] net/bnxt: fix Rx " Kalesh A P
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Kalesh A P @ 2023-02-01  4:20 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

The Tx queue stats are being reported incorrectly due to a workaround
for ring counters sometimes being reported as zero.  When a queue is
stopped and started, the ring counter is reset to zero.  The workaround
interprets the zero as incorrect, and sets the reported ring count as
the previously read value (from before the queue being restared).  This
shows up as negative counters in testpmd's "show fwd stats" command.
The fix clears the prev counter for the queue when the queue is started.

Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 67e0167..21c2217 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -560,6 +560,12 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	if (rc)
 		return rc;
 
+	/* reset the previous stats for the tx_queue since the counters
+	 * will be cleared when the queue is started.
+	 */
+	memset(&bp->prev_tx_ring_stats[tx_queue_id], 0,
+	       sizeof(struct bnxt_ring_stats));
+
 	bnxt_free_hwrm_tx_ring(bp, tx_queue_id);
 	rc = bnxt_alloc_hwrm_tx_ring(bp, tx_queue_id);
 	if (rc)
-- 
2.10.1


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

* [dpdk-dev] [PATCH 2/3] net/bnxt: fix Rx queue stats after queue stop and start
  2023-02-01  4:20 [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Kalesh A P
  2023-02-01  4:20 ` [dpdk-dev] [PATCH 1/3] net/bnxt: fix Tx queue stats after queue stop and start Kalesh A P
@ 2023-02-01  4:20 ` Kalesh A P
  2023-02-01  4:20 ` [dpdk-dev] [PATCH 3/3] net/bnxt: do not corrupt RSS hash value in the mbuf Kalesh A P
  2023-02-06 17:29 ` [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Ajit Khaparde
  3 siblings, 0 replies; 5+ messages in thread
From: Kalesh A P @ 2023-02-01  4:20 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

From: Mike Baucom <michael.baucom@broadcom.com>

The Rx queue stats are being reported incorrectly due to a workaround
for ring counters sometimes being reported as zero.  When a queue is
stopped and started, the ring counter is reset to zero.  The workaround
interprets the zero as incorrect, and sets the reported ring count as
the previously read value (from before the queue being restared).  This
shows up as negative counters in testpmd's "show fwd stats" command.
The fix clears the prev counter for the queue when the queue is started.

Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor")
Cc: stable@dpdk.org

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index fabbbd4..99758dd 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -471,6 +471,12 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 		return -EINVAL;
 	}
 
+	/* reset the previous stats for the rx_queue since the counters
+	 * will be cleared when the queue is started.
+	 */
+	memset(&bp->prev_rx_ring_stats[rx_queue_id], 0,
+	       sizeof(struct bnxt_ring_stats));
+
 	/* Set the queue state to started here.
 	 * We check the status of the queue while posting buffer.
 	 * If queue is it started, we do not post buffers for Rx.
-- 
2.10.1


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

* [dpdk-dev] [PATCH 3/3] net/bnxt: do not corrupt RSS hash value in the mbuf
  2023-02-01  4:20 [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Kalesh A P
  2023-02-01  4:20 ` [dpdk-dev] [PATCH 1/3] net/bnxt: fix Tx queue stats after queue stop and start Kalesh A P
  2023-02-01  4:20 ` [dpdk-dev] [PATCH 2/3] net/bnxt: fix Rx " Kalesh A P
@ 2023-02-01  4:20 ` Kalesh A P
  2023-02-06 17:29 ` [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Ajit Khaparde
  3 siblings, 0 replies; 5+ messages in thread
From: Kalesh A P @ 2023-02-01  4:20 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>

By clearing mbuf->hash.fdir.id in the data path, the driver is
corrupting the RSS hash value populated in the mbuf as they
are defined as a union.

This patch fixes the problem by removing the code that clears
mbuf->hash.fdir.id.

Fixes: 17b6c8386d73 ("net/bnxt: fix mark handling")
Cc: stable@dpdk.org

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index daaf9ff..0eebddb 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -813,7 +813,6 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1,
 
 skip_mark:
 	mbuf->hash.fdir.hi = 0;
-	mbuf->hash.fdir.id = 0;
 
 	return 0;
 }
-- 
2.10.1


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

* Re: [dpdk-dev] [PATCH 0/3] bnxt PMD fixes
  2023-02-01  4:20 [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Kalesh A P
                   ` (2 preceding siblings ...)
  2023-02-01  4:20 ` [dpdk-dev] [PATCH 3/3] net/bnxt: do not corrupt RSS hash value in the mbuf Kalesh A P
@ 2023-02-06 17:29 ` Ajit Khaparde
  3 siblings, 0 replies; 5+ messages in thread
From: Ajit Khaparde @ 2023-02-06 17:29 UTC (permalink / raw)
  To: Kalesh A P; +Cc: dev, ferruh.yigit

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

On Tue, Jan 31, 2023 at 8:23 PM Kalesh A P
<kalesh-anakkur.purayil@broadcom.com> wrote:
>
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> This patchset contains bnxt PMD bug fixes. Please apply.
Patchset applied dpdk-next-net-brcm. Thanks

>
> Kalesh AP (1):
>   net/bnxt: fix Tx queue stats after queue stop and start
>
> Mike Baucom (1):
>   net/bnxt: fix Rx queue stats after queue stop and start
>
> Venkat Duvvuru (1):
>   net/bnxt: do not corrupt RSS hash value in the mbuf
>
>  drivers/net/bnxt/bnxt_rxq.c | 6 ++++++
>  drivers/net/bnxt/bnxt_rxr.c | 1 -
>  drivers/net/bnxt/bnxt_txr.c | 6 ++++++
>  3 files changed, 12 insertions(+), 1 deletion(-)
>
> --
> 2.10.1
>

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

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

end of thread, other threads:[~2023-02-06 17:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01  4:20 [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Kalesh A P
2023-02-01  4:20 ` [dpdk-dev] [PATCH 1/3] net/bnxt: fix Tx queue stats after queue stop and start Kalesh A P
2023-02-01  4:20 ` [dpdk-dev] [PATCH 2/3] net/bnxt: fix Rx " Kalesh A P
2023-02-01  4:20 ` [dpdk-dev] [PATCH 3/3] net/bnxt: do not corrupt RSS hash value in the mbuf Kalesh A P
2023-02-06 17:29 ` [dpdk-dev] [PATCH 0/3] bnxt PMD fixes Ajit Khaparde

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