DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/nfp: fix minimum descriptor sizes
@ 2021-08-23  7:59 heinrich.kuhn
  2021-08-31 15:57 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: heinrich.kuhn @ 2021-08-23  7:59 UTC (permalink / raw)
  To: dev; +Cc: Heinrich Kuhn, stable, Simon Horman

From: Heinrich Kuhn <heinrich.kuhn@corigine.com>

The NFP4000/6000 supports a minimum of 256 Tx/Rx descriptors and not 64.
Before this patch when a DPDK application configured < 256 Tx
descriptors the hardware read/write pointers would be unmasked and not
wrapped at the expected size of the ring. The PMD logic to determine the
amount of free space in the Tx ring is incompatible with the unmasked
hwqueue pointers and this will result in the PMD not updating the
read pointer at all.The knock-on effect is that under high load the
PMD will potentially re-use a Tx descriptor before the hw has had a
chance to process that particular descriptor. This issue can manifest as
a DMA error when the hardware tries to perform a DMA with info from a
partially populated descriptor.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 drivers/net/nfp/nfp_rxtx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h
index d2d0f3f175..b0a8bf81b0 100644
--- a/drivers/net/nfp/nfp_rxtx.h
+++ b/drivers/net/nfp/nfp_rxtx.h
@@ -30,10 +30,10 @@
  * DPDK uses uint16_t variables for these values
  */
 #define NFP_NET_MAX_TX_DESC (32 * 1024)
-#define NFP_NET_MIN_TX_DESC 64
+#define NFP_NET_MIN_TX_DESC 256
 
 #define NFP_NET_MAX_RX_DESC (32 * 1024)
-#define NFP_NET_MIN_RX_DESC 64
+#define NFP_NET_MIN_RX_DESC 256
 
 /* Descriptor alignment */
 #define NFP_ALIGN_RING_DESC 128
-- 
2.30.1 (Apple Git-130)


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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: fix minimum descriptor sizes
  2021-08-23  7:59 [dpdk-dev] [PATCH] net/nfp: fix minimum descriptor sizes heinrich.kuhn
@ 2021-08-31 15:57 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-08-31 15:57 UTC (permalink / raw)
  To: heinrich.kuhn, dev; +Cc: stable, Simon Horman

On 8/23/2021 8:59 AM, heinrich.kuhn@corigine.com wrote:
> From: Heinrich Kuhn <heinrich.kuhn@corigine.com>
> 
> The NFP4000/6000 supports a minimum of 256 Tx/Rx descriptors and not 64.
> Before this patch when a DPDK application configured < 256 Tx
> descriptors the hardware read/write pointers would be unmasked and not
> wrapped at the expected size of the ring. The PMD logic to determine the
> amount of free space in the Tx ring is incompatible with the unmasked
> hwqueue pointers and this will result in the PMD not updating the
> read pointer at all.The knock-on effect is that under high load the
> PMD will potentially re-use a Tx descriptor before the hw has had a
> chance to process that particular descriptor. This issue can manifest as
> a DMA error when the hardware tries to perform a DMA with info from a
> partially populated descriptor.
> 
> Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2021-08-31 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23  7:59 [dpdk-dev] [PATCH] net/nfp: fix minimum descriptor sizes heinrich.kuhn
2021-08-31 15:57 ` [dpdk-dev] [dpdk-stable] " 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).