[dpdk-stable] patch 'net/bnxt: use prefix on global function' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:02:15 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

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/14/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/8965b6689600dbe98b8a970029b37616ec233e1a

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8965b6689600dbe98b8a970029b37616ec233e1a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Fri, 23 Apr 2021 14:04:44 -0700
Subject: [PATCH] net/bnxt: use prefix on global function
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit c02bbaa96b9f585021e02530ed4c7748f0db9188 ]

When statically linked the function prandom_bytes is exposed
and might conflict with something in application. All driver
functions should use the same prefix.

Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 4 ++--
 drivers/net/bnxt/bnxt_vnic.c | 4 ++--
 drivers/net/bnxt/bnxt_vnic.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 514a5ed433..b8020d9e98 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1397,8 +1397,8 @@ use_vnic:
 				/* If hash key has not been specified,
 				 * use random hash key.
 				 */
-				prandom_bytes(vnic->rss_hash_key,
-					      HW_HASH_KEY_SIZE);
+				bnxt_prandom_bytes(vnic->rss_hash_key,
+						   HW_HASH_KEY_SIZE);
 			} else {
 				if (rss->key_len > HW_HASH_KEY_SIZE)
 					memcpy(vnic->rss_hash_key,
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 1602fb2b88..007f7e93c9 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -16,7 +16,7 @@
  * VNIC Functions
  */
 
-void prandom_bytes(void *dest_ptr, size_t len)
+void bnxt_prandom_bytes(void *dest_ptr, size_t len)
 {
 	char *dest = (char *)dest_ptr;
 	uint64_t rb;
@@ -172,7 +172,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
 				HW_HASH_KEY_SIZE);
 		vnic->mc_list_dma_addr = vnic->rss_hash_key_dma_addr +
 				HW_HASH_KEY_SIZE;
-		prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
+		bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
 	}
 
 	return 0;
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index f173a02f97..07c7aeac0d 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -68,7 +68,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp);
 void bnxt_free_vnic_mem(struct bnxt *bp);
 int bnxt_alloc_vnic_mem(struct bnxt *bp);
 int bnxt_vnic_grp_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic);
-void prandom_bytes(void *dest_ptr, size_t len);
+void bnxt_prandom_bytes(void *dest_ptr, size_t len);
 uint16_t bnxt_rte_to_hwrm_hash_types(uint64_t rte_type);
 int bnxt_rte_to_hwrm_hash_level(struct bnxt *bp, uint64_t hash_f, uint32_t lvl);
 uint64_t bnxt_hwrm_to_rte_rss_level(struct bnxt *bp, uint32_t mode);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.724775900 +0800
+++ 0041-net-bnxt-use-prefix-on-global-function.patch	2021-06-12 06:53:56.200000000 +0800
@@ -1 +1 @@
-From c02bbaa96b9f585021e02530ed4c7748f0db9188 Mon Sep 17 00:00:00 2001
+From 8965b6689600dbe98b8a970029b37616ec233e1a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit c02bbaa96b9f585021e02530ed4c7748f0db9188 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index e3906b4779..844bf1520f 100644
+index 514a5ed433..b8020d9e98 100644
@@ -25 +27 @@
-@@ -1404,8 +1404,8 @@ skip_vnic_alloc:
+@@ -1397,8 +1397,8 @@ use_vnic:
@@ -37 +39 @@
-index 14ad33b4e8..de5c14566d 100644
+index 1602fb2b88..007f7e93c9 100644
@@ -59 +61 @@
-index 00a664c8b8..37b452f281 100644
+index f173a02f97..07c7aeac0d 100644


More information about the stable mailing list