patch 'net/ice/base: fix return type of bitmap hamming weight' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:48:54 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.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 08/14/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fddfbdbf498321fff0dcf34a0a097ff548eac8ca
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From fddfbdbf498321fff0dcf34a0a097ff548eac8ca 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 3b71c1b7f5..5c17bcb674 100644
--- a/drivers/net/ice/base/ice_bitops.h
+++ b/drivers/net/ice/base/ice_bitops.h
@@ -418,10 +418,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
* Note that this function assumes it is operating on a bitmap declared using
* 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;
while (size > (bit = ice_find_next_bit(bm, size, bit))) {
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index f7fcc3a8d4..07ebc624f5 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7390,7 +7390,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
ice_xor_bitmap(free_idx, used_idx, possible_idx, ICE_MAX_FV_WORDS);
/* 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);
}
static void ice_set_recipe_index(unsigned long idx, u8 *bitmap)
@@ -8101,6 +8101,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
enum ice_status status = ICE_SUCCESS;
struct ice_sw_recipe *rm;
u8 i;
+ u16 cnt;
if (!ice_is_prof_rule(rinfo->tun_type) && !lkups_cnt)
return ICE_ERR_PARAM;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:04.456166345 +0800
+++ 0057-net-ice-base-fix-return-type-of-bitmap-hamming-weigh.patch 2024-08-12 20:44:02.105069296 +0800
@@ -1 +1 @@
-From 509c55f699d1e13f38abaaf85df7bd9b585f5b87 Mon Sep 17 00:00:00 2001
+From fddfbdbf498321fff0dcf34a0a097ff548eac8ca Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -40 +42 @@
-index 711a6cfbbe..fa5bd94c58 100644
+index f7fcc3a8d4..07ebc624f5 100644
@@ -43 +45 @@
-@@ -7467,7 +7467,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
+@@ -7390,7 +7390,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
@@ -52 +54,2 @@
-@@ -8178,6 +8178,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -8101,6 +8101,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ enum ice_status status = ICE_SUCCESS;
@@ -55 +57,0 @@
- int status = ICE_SUCCESS;
More information about the stable
mailing list