patch 'net/nfp: fix control mempool creation' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:34:43 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=de78bd45d68934e05d448138902adaeeab525046

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From de78bd45d68934e05d448138902adaeeab525046 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu at corigine.com>
Date: Fri, 9 Jun 2023 14:00:58 +0800
Subject: [PATCH] net/nfp: fix control mempool creation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d694d4e1f20353a020a5fd04ea6a1dd8a84d29eb ]

The former logic does not consider the simultaneous initialization of
several NICs using flower firmware. The reason the initialization
failed was because several NICs use the same name parameter when we
call rte_pktmbuf_pool_create().

We use the PCI address to give each NIC a unique name parameter and let
the initialization succeed.

Fixes: 945441ebdb9c ("net/nfp: add flower ctrl VNIC")

Signed-off-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 9c237bdb72..0661c38f08 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -698,6 +698,7 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
 	struct rte_eth_dev *eth_dev;
 	const struct rte_memzone *tz;
 	struct nfp_app_fw_flower *app_fw_flower;
+	char ctrl_pktmbuf_pool_name[RTE_MEMZONE_NAMESIZE];
 
 	/* Set up some pointers here for ease of use */
 	pf_dev = hw->pf_dev;
@@ -731,7 +732,10 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
 
 	/* Create a mbuf pool for the ctrl vNIC */
 	numa_node = rte_socket_id();
-	app_fw_flower->ctrl_pktmbuf_pool = rte_pktmbuf_pool_create("ctrl_mbuf_pool",
+	snprintf(ctrl_pktmbuf_pool_name, sizeof(ctrl_pktmbuf_pool_name),
+			"%s_ctrlmp", pf_dev->pci_dev->device.name);
+	app_fw_flower->ctrl_pktmbuf_pool =
+			rte_pktmbuf_pool_create(ctrl_pktmbuf_pool_name,
 			4 * CTRL_VNIC_NB_DESC, 64, 0, 9216, numa_node);
 	if (app_fw_flower->ctrl_pktmbuf_pool == NULL) {
 		PMD_INIT_LOG(ERR, "Create mbuf pool for ctrl vnic failed");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.259970000 +0800
+++ 0065-net-nfp-fix-control-mempool-creation.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From d694d4e1f20353a020a5fd04ea6a1dd8a84d29eb Mon Sep 17 00:00:00 2001
+From de78bd45d68934e05d448138902adaeeab525046 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d694d4e1f20353a020a5fd04ea6a1dd8a84d29eb ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +30 @@
-index 8e1bc22747..53ee936f4c 100644
+index 9c237bdb72..0661c38f08 100644
@@ -31 +33 @@
-@@ -421,6 +421,7 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
+@@ -698,6 +698,7 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
@@ -39 +41 @@
-@@ -454,7 +455,10 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)
+@@ -731,7 +732,10 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw)


More information about the stable mailing list