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

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon May 17 18:10:02 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/19/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/22de2f6dc62c4463dc26cedfd36a2d6c49893040

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 22de2f6dc62c4463dc26cedfd36a2d6c49893040 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

[ 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 fea35f53f8..e110c20f15 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1388,8 +1388,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 ef07721148..8f15699fa7 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 652a3c8f3f..f4477106c3 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -65,6 +65,6 @@ 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);
 #endif
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:36.171164821 +0200
+++ 0173-net-bnxt-use-prefix-on-global-function.patch	2021-05-17 17:40:29.503812091 +0200
@@ -1 +1 @@
-From c02bbaa96b9f585021e02530ed4c7748f0db9188 Mon Sep 17 00:00:00 2001
+From 22de2f6dc62c4463dc26cedfd36a2d6c49893040 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c02bbaa96b9f585021e02530ed4c7748f0db9188 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index e3906b4779..844bf1520f 100644
+index fea35f53f8..e110c20f15 100644
@@ -25 +26 @@
-@@ -1404,8 +1404,8 @@ skip_vnic_alloc:
+@@ -1388,8 +1388,8 @@ use_vnic:
@@ -37 +38 @@
-index 14ad33b4e8..de5c14566d 100644
+index ef07721148..8f15699fa7 100644
@@ -59 +60 @@
-index 00a664c8b8..37b452f281 100644
+index 652a3c8f3f..f4477106c3 100644
@@ -62 +63 @@
-@@ -68,7 +68,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp);
+@@ -65,6 +65,6 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp);
@@ -69,2 +70 @@
- 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);
+ #endif


More information about the stable mailing list