From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BEA04455AD for ; Mon, 15 Jul 2024 17:29:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BADE540DDE; Mon, 15 Jul 2024 17:29:48 +0200 (CEST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id B55A240A71 for ; Mon, 15 Jul 2024 17:29:40 +0200 (CEST) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-52e9c55febcso5734634e87.2 for ; Mon, 15 Jul 2024 08:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057380; x=1721662180; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cA2ZnAzR798Y4R0G2NdpFvX41m012a7npjmNUtpTkls=; b=NqQobbEDXOX8JVOITyLEoLEp6Z7Uc0rHHL64uJd8/ZRFqyerLg00MZxdYx66XDXpNs xo5iYAMuUVc+Jk8uo6m7aC/mj0iOPvclBKk1OCi7SIrErquQrB08+e7faiowxa3IYkzn h5ySDR4/LzwyxSu4MP1gFJFlfF+YJV4QdznWG6IwBW99+S0BLycR8i6WuN2SfF1Lx6q5 wbLGmqkDafVgQKM2o+lXZxSHz37swOHQkM4EDfCvvgJ/ETGL9NVYCm3YNVh3fk4vRbEA FeN39XcZAj3xAfE3MHwUujpv3JU0ch3mKlVzRQXa1eCUdt2SfymsFHtbAwkHWw0Rx3+W JgeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057380; x=1721662180; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cA2ZnAzR798Y4R0G2NdpFvX41m012a7npjmNUtpTkls=; b=bTfUF6MLm8hZtS3LzC3ulI172Uv0uwZVHyy6HjViJPeJDvv4NDpPzqWOD1QJtzUY8f nF+0zF79VpLihBVUmm3Y7yp2i3LGZmi8czHr6fVSmTmKgn2/7P0pORhvD/heVW3x4eTR s7CUu8g3dL6PoATut2cLFo7fn7qcsx+Cg7uBbPZybVJRjiWuKbEIjh1I7VDBo7+bM+qr ign2KnnQqOXAXTkaP/DG6ahI6OM8HJgWavzdnm9vutJ7wWQMYjyu8WwLeG4XxH/biFRs 90RxW8B+AlKEGwRQlSXWLRSZrjO67gxGdT78T4/fHomj6feFnF2bXMUpJugIVGnv5IRL L3ww== X-Forwarded-Encrypted: i=1; AJvYcCWWBHspfM3sQBtouWk4RBs44Agke+HXPvKs1ZxQ8fmJqI6BdM5VTbrl1gAQYU2i9CXaD3qLgWFwKYTPc7JUYtQ= X-Gm-Message-State: AOJu0YxWo6tXWv+oom7KkiX3bCM5dRhn9L3T008meDhXcoxNjye3IX2t LxoblQYg/dFgaw4x+MbRv+akNQX03RYe3fYnQ8B8ZYFy5P+MgYASj570oNWr/Gs= X-Google-Smtp-Source: AGHT+IFgVXuOXviFiauVjMrFs51yip/2nv6la7vJFL9iN7V8oi6iYr9eZ2uoZCn8rmxvLV4jLJv1gw== X-Received: by 2002:a05:6512:547:b0:52c:dcd4:8953 with SMTP id 2adb3069b0e04-52eb99a3505mr10465001e87.36.1721057379943; Mon, 15 Jul 2024 08:29:39 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a630b218sm88917215e9.14.2024.07.15.08.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:29:39 -0700 (PDT) From: luca.boccassi@gmail.com To: Chinh Cao Cc: Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix return type of bitmap hamming weight' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:26:27 +0100 Message-Id: <20240715152704.2229503-49-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/e31db1b871f0cc94a1120e560580c562d8089a23 Thanks. Luca Boccassi --- >From e31db1b871f0cc94a1120e560580c562d8089a23 Mon Sep 17 00:00:00 2001 From: Chinh Cao 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 Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- 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 c4ae2b9c8e..81f9dadc07 100644 --- a/drivers/net/ice/base/ice_bitops.h +++ b/drivers/net/ice/base/ice_bitops.h @@ -411,10 +411,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 a2581f404d..697b45ccf4 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -7124,7 +7124,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); } /** @@ -7822,6 +7822,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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:37.113619586 +0100 +++ 0049-net-ice-base-fix-return-type-of-bitmap-hamming-weigh.patch 2024-07-15 16:19:34.600207147 +0100 @@ -1 +1 @@ -From 509c55f699d1e13f38abaaf85df7bd9b585f5b87 Mon Sep 17 00:00:00 2001 +From e31db1b871f0cc94a1120e560580c562d8089a23 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 3b71c1b7f5..5c17bcb674 100644 +index c4ae2b9c8e..81f9dadc07 100644 @@ -26 +27 @@ -@@ -418,10 +418,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits) +@@ -411,10 +411,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits) @@ -40 +41 @@ -index 711a6cfbbe..fa5bd94c58 100644 +index a2581f404d..697b45ccf4 100644 @@ -43 +44 @@ -@@ -7467,7 +7467,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles, +@@ -7124,7 +7124,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles, @@ -51,2 +52,3 @@ - static void ice_set_recipe_index(unsigned long idx, u8 *bitmap) -@@ -8178,6 +8178,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, + /** +@@ -7822,6 +7822,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, + enum ice_status status = ICE_SUCCESS; @@ -55 +56,0 @@ - int status = ICE_SUCCESS;