[dpdk-stable] patch 'net/nfp: fix minimum descriptor sizes' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:28:24 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/877a05209a26c5543d1bf9a2bf8cb023e5d59b94

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 877a05209a26c5543d1bf9a2bf8cb023e5d59b94 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn at corigine.com>
Date: Mon, 23 Aug 2021 09:59:21 +0200
Subject: [PATCH] net/nfp: fix minimum descriptor sizes
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 96289f2b80e5921a3da54650f382b6944d9b39df ]

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

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

diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index 1295c5959e..444c1b3773 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -28,10 +28,10 @@ struct nfp_net_adapter;
  * 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.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.014728008 +0800
+++ 0020-net-nfp-fix-minimum-descriptor-sizes.patch	2021-11-10 14:17:01.757413685 +0800
@@ -1 +1 @@
-From 96289f2b80e5921a3da54650f382b6944d9b39df Mon Sep 17 00:00:00 2001
+From 877a05209a26c5543d1bf9a2bf8cb023e5d59b94 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 96289f2b80e5921a3da54650f382b6944d9b39df ]
@@ -19 +21,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
- drivers/net/nfp/nfp_rxtx.h | 4 ++--
+ drivers/net/nfp/nfp_net_pmd.h | 4 ++--
@@ -27,5 +29,5 @@
-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 @@
+diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
+index 1295c5959e..444c1b3773 100644
+--- a/drivers/net/nfp/nfp_net_pmd.h
++++ b/drivers/net/nfp/nfp_net_pmd.h
+@@ -28,10 +28,10 @@ struct nfp_net_adapter;


More information about the stable mailing list