patch 'net/ice/base: fix return type of bitmap hamming weight' has been queued to stable release 21.11.8

Kevin Traynor ktraynor at redhat.com
Fri Aug 23 18:18:35 CEST 2024


Hi,

FYI, your patch has been queued to stable release 21.11.8

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8d4ee9a574b6776413f0488255ea522545fd27e2

Thanks.

Kevin

---
>From 8d4ee9a574b6776413f0488255ea522545fd27e2 Mon Sep 17 00:00:00 2001
From: Chinh Cao <chinh.t.cao at intel.com>
Date: Wed, 26 Jun 2024 12:41:11 +0100
Subject: [PATCH] net/ice/base: fix return type of bitmap hamming weight

[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]

"count" is the returned value, and in this function, value of "count"
and "bit" are the same, so there is no reason why these values should be
declared as different types, and for returned value data type to be
different.

Fixes: 6d288fa5f72b ("net/ice/base: introduce and use bitmap hamming weight API")

Signed-off-by: Chinh Cao <chinh.t.cao at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/ice/base/ice_bitops.h | 4 ++--
 drivers/net/ice/base/ice_switch.c | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h
index 21ec2014e1..7e61fec5ef 100644
--- a/drivers/net/ice/base/ice_bitops.h
+++ b/drivers/net/ice/base/ice_bitops.h
@@ -409,8 +409,8 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
  * ice_declare_bitmap.
  */
-static inline int
+static inline u16
 ice_bitmap_hweight(ice_bitmap_t *bm, u16 size)
 {
-	int count = 0;
+	u16 count = 0;
 	u16 bit = 0;
 
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 7c6a258255..468d58cdb9 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7122,5 +7122,5 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
 
 	/* return number of free indexes */
-	return (u16)ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
+	return ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
 }
 
@@ -7839,4 +7839,5 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	struct ice_sw_recipe *rm;
 	u8 i;
+	u16 cnt;
 
 	if (!ice_is_prof_rule(rinfo->tun_type) && !lkups_cnt)
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:12.299112687 +0100
+++ 0087-net-ice-base-fix-return-type-of-bitmap-hamming-weigh.patch	2024-08-23 17:18:09.776430301 +0100
@@ -1 +1 @@
-From 509c55f699d1e13f38abaaf85df7bd9b585f5b87 Mon Sep 17 00:00:00 2001
+From 8d4ee9a574b6776413f0488255ea522545fd27e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 3b71c1b7f5..5c17bcb674 100644
+index 21ec2014e1..7e61fec5ef 100644
@@ -26 +27 @@
-@@ -419,8 +419,8 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
+@@ -409,8 +409,8 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
@@ -38 +39 @@
-index 711a6cfbbe..fa5bd94c58 100644
+index 7c6a258255..468d58cdb9 100644
@@ -41 +42 @@
-@@ -7468,5 +7468,5 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
+@@ -7122,5 +7122,5 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
@@ -48 +49,2 @@
-@@ -8179,4 +8179,5 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -7839,4 +7839,5 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ 	struct ice_sw_recipe *rm;
@@ -50 +51,0 @@
- 	int status = ICE_SUCCESS;



More information about the stable mailing list