patch 'net/nfp: fix flow hash table creation' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:34:45 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=74870817fb82f87461842b236393c88400c89be9

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 74870817fb82f87461842b236393c88400c89be9 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu at corigine.com>
Date: Fri, 9 Jun 2023 14:01:00 +0800
Subject: [PATCH] net/nfp: fix flow hash table 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 6f37cbf6323770ab5be1a9635c46845d7454e984 ]

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

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

Fixes: ac09376096d8 ("net/nfp: add structures and functions for flow offload")

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/nfp_flow.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 23dc9f06ce..5b562a1086 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -4038,11 +4038,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
 	size_t stats_size;
 	uint64_t ctx_count;
 	uint64_t ctx_split;
+	char mask_name[RTE_HASH_NAMESIZE];
+	char flow_name[RTE_HASH_NAMESIZE];
+	char pretun_name[RTE_HASH_NAMESIZE];
 	struct nfp_flow_priv *priv;
 	struct nfp_app_fw_flower *app_fw_flower;
 
+	snprintf(mask_name, sizeof(mask_name), "%s_mask",
+			pf_dev->pci_dev->device.name);
+	snprintf(flow_name, sizeof(flow_name), "%s_flow",
+			pf_dev->pci_dev->device.name);
+	snprintf(pretun_name, sizeof(pretun_name), "%s_pretun",
+			pf_dev->pci_dev->device.name);
+
 	struct rte_hash_parameters mask_hash_params = {
-		.name       = "mask_hash_table",
+		.name       = mask_name,
 		.entries    = NFP_MASK_TABLE_ENTRIES,
 		.hash_func  = rte_jhash,
 		.socket_id  = rte_socket_id(),
@@ -4051,7 +4061,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
 	};
 
 	struct rte_hash_parameters flow_hash_params = {
-		.name       = "flow_hash_table",
+		.name       = flow_name,
 		.hash_func  = rte_jhash,
 		.socket_id  = rte_socket_id(),
 		.key_len    = sizeof(uint32_t),
@@ -4059,7 +4069,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
 	};
 
 	struct rte_hash_parameters pre_tun_hash_params = {
-		.name       = "pre_tunnel_table",
+		.name       = pretun_name,
 		.entries    = 32,
 		.hash_func  = rte_jhash,
 		.socket_id  = rte_socket_id(),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.305191200 +0800
+++ 0067-net-nfp-fix-flow-hash-table-creation.patch	2023-06-25 14:31:58.425773900 +0800
@@ -1 +1 @@
-From 6f37cbf6323770ab5be1a9635c46845d7454e984 Mon Sep 17 00:00:00 2001
+From 74870817fb82f87461842b236393c88400c89be9 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6f37cbf6323770ab5be1a9635c46845d7454e984 ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +30 @@
-index a224d01670..359423dc28 100644
+index 23dc9f06ce..5b562a1086 100644
@@ -31 +33 @@
-@@ -4106,11 +4106,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
+@@ -4038,11 +4038,21 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
@@ -54 +56 @@
-@@ -4119,7 +4129,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
+@@ -4051,7 +4061,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
@@ -63 +65 @@
-@@ -4127,7 +4137,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)
+@@ -4059,7 +4069,7 @@ nfp_flow_priv_init(struct nfp_pf_dev *pf_dev)


More information about the stable mailing list