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 8C7964624E 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 80788402E8; Mon, 17 Feb 2025 18:07:19 +0100 (CET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id CDF6D400EF for ; Mon, 17 Feb 2025 18:07:17 +0100 (CET) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38f378498b0so1604916f8f.0 for ; Mon, 17 Feb 2025 09:07:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812037; x=1740416837; 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=pNj8cdWtX81DJnbOjfyh9FkAU0op7Y4BHm78akLJxwc=; b=Nuo+vAAqOy7LgZzbgBCfNrUdskWQ7UGTCQcoIO+8rfteS6T2245t2yJebDKQeIjCT5 W2UJrted3uyVS2788zm6PXSW7m4PGNyqqXtZDgFo2QSEwjr2vviSFu4W4yMM4GYo+RcG hFMlXwG0LtoAPyyczc2CFoD64DzbPcC0/lXgZvkNiHcCQ75yb5eGBN8dNomQLbYmRCsX +q8l1+C/lqLtPO2MeKuRb44Kuol5CxIOdH2j/Hw3SvgeoFWaOz5UWqMDgrsjnC1fR0SX nfmYltQleVJBSpFUg3cI2Big1lqtUoBUP+1wPvO7ry+apgbP0q/yXZSzfA1CTPS7yjHw TtiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812037; x=1740416837; 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=pNj8cdWtX81DJnbOjfyh9FkAU0op7Y4BHm78akLJxwc=; b=KoeNZ1NXhK3m2wrXMsUyKgNl9Iu7NGCAZXdJ/vBUWAmT4POxJ3ls++1SlArenpX26y tKfgmSZlvrANz9BxpBsV4Xn6R6+OqAHPFE7hYd2mRInfrrYgu6phJFxRYytC2QgOhGoi NR4CpMEEVTh8i4e3nt1EP0y0c2uzSKNjjJU+2/4cOKGn5NRYjlgtOHSIvyHW9HFlhRrq 3VnTppuTSB8Xh5ahXL09alMQP3YaiuXPWdStU/4dZxU8fDimKN0JMABLuLkDH/vFEHEv slvuQtgxoZbvoMxit5+E2T/C7EY7Ip1I6detP1LVgNSnvDgm7O76qYEV0f81XnHAf6WJ iJZw== X-Forwarded-Encrypted: i=1; AJvYcCWAdtjosFgJlgwkRh0nYqsq69CcgNVCZYyAFO2dP5uIIQPi8cn/2QumvMwlpU3gCQjnuFhFT+U=@dpdk.org X-Gm-Message-State: AOJu0YwSkHlYH0rVJHHm8Tsep6gTSYOFeR/zfCk/J/Mloqi8oTk/LlzM NrVO0ziyZ9BFwPts5uZosg25fYI6l8AHv38LOKZTM9BbC5qo89w/ X-Gm-Gg: ASbGnct5Syb4qpmBK2ESP8L4qfbTnnOi3A4G02UtFEtCDdeHAPPggM+yZxIM09Xcaoa WjlF8Z+wQ7NbGSWUgCqTfaRq9qonoeO/+pGds2Ig/X8toq51r9r+14dnF70Uxt1NiCDaxyIGwxV StUHslJaG+1gWgguGe+CEBn2j/iZWF3B/D5Wamju0yQovGN9r+6aUKUIj0+v9wPwe3rT+p/t3ci 0EyPENIQLqO9pecKK7mFuz7GzsmnKtu45OBCS1vNxFiyuKyetywjfD0ALISi8ikPaeFehPEusLb ogi2wqIbZQvqPyX39/QXpg== X-Google-Smtp-Source: AGHT+IHjOeqLDkZl0WJrKgazedOYgpNMkp5g+CT//swT+WBsmooNhYDtR9Gs1qbflicK5lgXs5v09g== X-Received: by 2002:adf:ee92:0:b0:38d:de92:adad with SMTP id ffacd0b85a97d-38f33f2b1ebmr6352908f8f.22.1739812037272; Mon, 17 Feb 2025 09:07:17 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-38f259d94acsm12957553f8f.75.2025.02.17.09.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:07:16 -0800 (PST) From: luca.boccassi@gmail.com To: Barbara Skobiej Cc: Anatoly Burakov , Bruce Richardson , dpdk stable Subject: patch 'net/igc/base: fix data type in MAC hash' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:18 +0000 Message-ID: <20250217170456.1068278-45-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/377f2051765cc29b2afe80d6f73bab72a11c925a Thanks. Luca Boccassi --- >From 377f2051765cc29b2afe80d6f73bab72a11c925a Mon Sep 17 00:00:00 2001 From: Barbara Skobiej Date: Thu, 6 Feb 2025 16:08:35 +0000 Subject: [PATCH] net/igc/base: fix data type in MAC hash [ upstream commit cad5c51ec3a0e965d6d4bb98166890499597f23a ] One of the bit shifts in MAC hash calculation triggers a static analysis warning about a potential overflow. Fix the data type to avoid this. Fixes: 8cb7c57d9b3c ("net/igc: support device initialization") Signed-off-by: Barbara Skobiej Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- drivers/net/igc/base/igc_mac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/igc/base/igc_mac.c b/drivers/net/igc/base/igc_mac.c index c69f8ac73b..cfb74a6443 100644 --- a/drivers/net/igc/base/igc_mac.c +++ b/drivers/net/igc/base/igc_mac.c @@ -539,8 +539,10 @@ u32 igc_hash_mc_addr_generic(struct igc_hw *hw, u8 *mc_addr) break; } - hash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) | - (((u16)mc_addr[5]) << bit_shift))); + hash_value = (u32)mc_addr[4]; + hash_value = hash_value >> (8 - bit_shift); + hash_value |= (((u32)mc_addr[5]) << bit_shift); + hash_value &= hash_mask; return hash_value; } -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:18.451798931 +0000 +++ 0045-net-igc-base-fix-data-type-in-MAC-hash.patch 2025-02-17 16:13:16.842441592 +0000 @@ -1 +1 @@ -From cad5c51ec3a0e965d6d4bb98166890499597f23a Mon Sep 17 00:00:00 2001 +From 377f2051765cc29b2afe80d6f73bab72a11c925a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit cad5c51ec3a0e965d6d4bb98166890499597f23a ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - drivers/net/intel/igc/base/igc_mac.c | 6 ++++-- + drivers/net/igc/base/igc_mac.c | 6 ++++-- @@ -19 +20 @@ -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 @@ -21,2 +22,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