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 502D44624E for ; Mon, 17 Feb 2025 18:07:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A017402DD; Mon, 17 Feb 2025 18:07:19 +0100 (CET) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 9F8DA402C9 for ; Mon, 17 Feb 2025 18:07:16 +0100 (CET) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-38f286b5281so2125422f8f.1 for ; Mon, 17 Feb 2025 09:07:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812036; x=1740416836; 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=BPmLa1ZKV5kotLW9DJqBReb+NW7Q3DKLpWpMoEamBJg=; b=RHxz7RBXg+3cU993zpqqbqU1fc+0v2YQMwdGPjJeD3fkRA5QtgBxHrezbzHY2BbK4e Ohc+0vhaif3WAeKdqfjU/d8bKX6Ff/qRqGuuhm6PkH5/uxSVh82I/AmUfCJgNHtgWpeG apxP6nNQVDgg6v2a+meWt4LBvpajmJUS1pZWJ7Chlq3AsVTFsNcn5fS89kPIk7bMWw/Z b5PmWqWyyrYooR1EeFfYARsozSjDNRaHBcObmj7VuJBd41uHPid1yd4J+5X4kEQudmOl YqcMya3tKnc2L9S5LXPB78Uu+672GUzxH1vmeSh273X6TPC/Qy2XxcdbNjtrFZxXRN99 lcig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812036; x=1740416836; 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=BPmLa1ZKV5kotLW9DJqBReb+NW7Q3DKLpWpMoEamBJg=; b=by1UOf5OyiHntMa1nUskkcLX/4qqvzAVBMBGRI7t7FjhOlvjIDuzV+RSneN6ReC1Wj 556jOcT6juzRhQVglXf6ovkQ2i1cgZwqcu5UF8uQkSX9sBv9qi6nAdK5bCefdDHyxvaW FEtlHz9BShFOxDt0gr/J/Yi1hNiy+DVdSHCdWOQ1OZldnPa3WGzTWZTRT0/xjhUuardI 3BipS35aGDPYX99PyE+CC0jJKQ53Hy89wyftdkyfRmCAE8qCbo+rak6g+L5DWQkPzEZW hWx1dW3C642Q+b3rW/0opcD+wuT7Es41c8FdV+J2m2fVXLMUI9Jco0IpJU6U7Hxf836b bHzQ== X-Forwarded-Encrypted: i=1; AJvYcCVZ0loBseU+b2G3Wot5WcwNavHhcLcYYFaZxn4Sz6npsHqgWLYp2G3pl4uQEyBFyoWLhgIPXV8=@dpdk.org X-Gm-Message-State: AOJu0Yz8fsZVIDdre6ZDM/YmUptbOVEs8dbItkDh42bghVOfqZHWmadZ iHWqfaREoQBALQJ2ZcSfLmcg9M3HE8UQVRLpGbgx0+ZnU64ryh3GnQ9kCEm4IfWecg== X-Gm-Gg: ASbGncvraMHxW8dd69a3T7jEnqD4aJTThWp6UI3gLi5dh85+UzH0gUyvLvv7DU6Eumc Abu4wa9vsew6HNub3QtGgCNrL5wkyMH7wF7r3G1LHpBPKyoD97Hrj1L4bfSlWqSuZWl/2KE+EBG mTmIDaeWKblSHT8t4X7PoTnkCrzE8kMeOYXed4R05demidxCrWSq0YwxfdYdpbn1LEgCm+69uIS FLhGEQk3IWGs2cO3C2H1C4X0yU2YPPaBbIMV21yD9hX5tg9uc6900dj3taKRxp55EiRKIz9JjU/ Rdg6psCF6LdvXjadF43KbA== X-Google-Smtp-Source: AGHT+IEYPhX1xwRaOctvzXUAUUt97MuIt6OlFS17oeHXEnq94CRgjM5LSSn+Ta43c4SnR+wkNAVgWQ== X-Received: by 2002:a5d:59a2:0:b0:38d:d9bd:18a6 with SMTP id ffacd0b85a97d-38f33f437fdmr9828177f8f.42.1739812036033; Mon, 17 Feb 2025 09:07:16 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-38f258cccd3sm12740943f8f.23.2025.02.17.09.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:07:15 -0800 (PST) From: luca.boccassi@gmail.com To: Aleksandr Loktionov Cc: Anatoly Burakov , Bruce Richardson , dpdk stable Subject: patch 'net/igc/base: fix MAC address hash bit shift' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:17 +0000 Message-ID: <20250217170456.1068278-44-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-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.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 02/19/25. 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/39bd37c0740887a94a5c8751d94666bd07e12a20 Thanks. Luca Boccassi --- >From 39bd37c0740887a94a5c8751d94666bd07e12a20 Mon Sep 17 00:00:00 2001 From: Aleksandr Loktionov Date: Thu, 6 Feb 2025 16:08:34 +0000 Subject: [PATCH] net/igc/base: fix MAC address hash bit shift [ upstream commit bccccacfb6f6f2e84a24c6733c7e3d4af05f73b5 ] In e1000_hash_mc_addr_generic() the expression: "mc_addr[4] >> 8 - bit_shift", right shifting "mc_addr[4]" shift by more than 7 bits always yields zero, so hash becomes not so different. Add initialization with bit_shift = 1, and add a loop condition to ensure bit_shift will be always in [1..8] range. Fixes: 8cb7c57d9b3c ("net/igc: support device initialization") Signed-off-by: Aleksandr Loktionov Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- drivers/net/igc/base/igc_mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/igc/base/igc_mac.c b/drivers/net/igc/base/igc_mac.c index 3cd6506e5e..c69f8ac73b 100644 --- a/drivers/net/igc/base/igc_mac.c +++ b/drivers/net/igc/base/igc_mac.c @@ -486,7 +486,7 @@ static int igc_rar_set_generic(struct igc_hw *hw, u8 *addr, u32 index) u32 igc_hash_mc_addr_generic(struct igc_hw *hw, u8 *mc_addr) { u32 hash_value, hash_mask; - u8 bit_shift = 0; + u8 bit_shift = 1; DEBUGFUNC("igc_hash_mc_addr_generic"); @@ -496,7 +496,7 @@ u32 igc_hash_mc_addr_generic(struct igc_hw *hw, u8 *mc_addr) /* For a mc_filter_type of 0, bit_shift is the number of left-shifts * where 0xFF would still fall within the hash mask. */ - while (hash_mask >> bit_shift != 0xFF) + while (hash_mask >> bit_shift != 0xFF && bit_shift < 4) bit_shift++; /* The portion of the address that is used for the hash table -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:18.419325384 +0000 +++ 0044-net-igc-base-fix-MAC-address-hash-bit-shift.patch 2025-02-17 16:13:16.842441592 +0000 @@ -1 +1 @@ -From bccccacfb6f6f2e84a24c6733c7e3d4af05f73b5 Mon Sep 17 00:00:00 2001 +From 39bd37c0740887a94a5c8751d94666bd07e12a20 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bccccacfb6f6f2e84a24c6733c7e3d4af05f73b5 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ - drivers/net/intel/igc/base/igc_mac.c | 4 ++-- + drivers/net/igc/base/igc_mac.c | 4 ++-- @@ -24 +25 @@ -diff --git a/drivers/net/intel/igc/base/igc_mac.c b/drivers/net/intel/igc/base/igc_mac.c +diff --git a/drivers/net/igc/base/igc_mac.c b/drivers/net/igc/base/igc_mac.c @@ -26,2 +27,2 @@ ---- a/drivers/net/intel/igc/base/igc_mac.c -+++ b/drivers/net/intel/igc/base/igc_mac.c +--- a/drivers/net/igc/base/igc_mac.c ++++ b/drivers/net/igc/base/igc_mac.c