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 7776745D5D for ; Thu, 21 Nov 2024 00:42:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 652E240296; Thu, 21 Nov 2024 00:42:46 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 9039943274 for ; Thu, 21 Nov 2024 00:42:44 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-382456c6597so164113f8f.2 for ; Wed, 20 Nov 2024 15:42:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732146164; x=1732750964; 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=3MHdDg+16xlDmENyO9npgjolcVTWlHeBjRKfCFBsR4U=; b=NUFhGY5fF5dF2Fzm+YE+icGD3swgGTemi+m89VBP6Q0Mb6HVACakN1auZKu6NakVl2 PNBdIttPeC4d2Y3PiJhwzM6CqIYPWncrDx7g9FdeqiU0GLDQR8DisTdHC4e7lC7myc4n hT0nuZl+79YHl8CvTCh3SlerauadQVg7hctpl68MGJEuJ/KXVoxDGe8Di1W1eg4oz4Hv Wk8OIjw+repTomQyvsfhB2vxPRoo2JJXmcKTsBw6tSKtK35vZb/6gP8NU6BxVDLQ+/hd i3Bq/hGmaX2g4MHN6lgO4YMcVyhfEcdyHt5uCOOl7cC84mCIw2jgKistEZ9fP+xWxQXl XdnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732146164; x=1732750964; 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=3MHdDg+16xlDmENyO9npgjolcVTWlHeBjRKfCFBsR4U=; b=hyHNh1Ovi72yrLgTPEq8uUsXMDOi2CzxdvMF+3PTiaRpHGONVZAFZOBW6IS7Cv80IL mZqqEMurHO8aqArHazJU8lsXUlDON1/GBysJst1t4FIJYi64Sgplo6bxCVm8cIVylZj3 b0qJQHXRfnZQ09KciN3NonJ8KX27gwFzVB3UOhclDx5VNNlz0ObV7450DXY2rGSqUr6Z pxfWeQ73koC6szraRTIWeg/23Dy3xEk6JblGh5rp+pTf63nlvW0giDYizBFFqyvyGq3W i11lWuM86vGRlbhKKkWT5lLeBGFv3Ik6rTHBIh4mvZ1kt6ukDLjin2w2XOmzhnAAkH3C yS+A== X-Gm-Message-State: AOJu0YzXVNUW79hpG54VrVM2PfArALW53uggfvIWYfmwe0An23qC4aQ6 ukPmdshFvvrbE0XoF4erKtDnhtuGGLzq3Y5YDE31G8sdwuOCcPEh4Mx2+tlR X-Gm-Gg: ASbGncukkt3V3Yc5Sui9QGNAlo3BXMmnflNz+NqM4Vxm+ju7+nYYOPRJ6ZJuhEsnd7P iLeKfsYGxCinmNBvDCYX5tOaQIEQxc6C9tyH2YPkaL+mMHXejjX679PQlevPw5lunSyI3d4e5pK 4SS2cve7/6cn1Tk3UMf24VqIeV4LfWpAsESFTdes6UltfwCgy3oipTb7Mbe0ScXO2mgyca+GnmO FYKYbRKafseq2hnFJJ0/vOnSUCIQLLqm8m8hPKOp6Hyqh2uS4OX8Vc6 X-Google-Smtp-Source: AGHT+IFB0Plq8r2fPUo4k7XQkSN/FigXzPEEU1+f+4h9KHOTTuLCCO0gEKxZsdyfXDhksWNOD2D2vg== X-Received: by 2002:a05:6000:184d:b0:382:4a75:57f4 with SMTP id ffacd0b85a97d-38254b24d42mr2927836f8f.56.1732146164130; Wed, 20 Nov 2024 15:42:44 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825493ee20sm3286802f8f.100.2024.11.20.15.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 15:42:42 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Subject: patch 'net/bnx2x: fix always true expression' has been queued to stable release 22.11.7 Date: Wed, 20 Nov 2024 23:41:32 +0000 Message-ID: <20241120234215.233355-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241120234215.233355-1-luca.boccassi@gmail.com> References: <20241112220754.666489-40-luca.boccassi@gmail.com> <20241120234215.233355-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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/22/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/3b501926d5c06c24a669d0ac532b6f4e087ed6f9 Thanks. Luca Boccassi --- >From 3b501926d5c06c24a669d0ac532b6f4e087ed6f9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 12 Nov 2024 09:43:54 -0800 Subject: [PATCH] net/bnx2x: fix always true expression [ upstream commit fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 ] Coverity spotted that the check to enable single interrupt mode would evaluate as always true since: The or condition sc->interrupt_mode != 2 || sc->interrupt_mode != 3 will always be true because sc->interrupt_mode cannot be equal to two different values at the same time, so it must be not equal to at least one of them. Coverity issue: 362046 Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Stephen Hemminger --- drivers/net/bnx2x/bnx2x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 55a91fad78..8e6d2c5c80 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -11195,11 +11195,9 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc) /* Turn on a single ISR mode in IGU if driver is going to use * INT#x or MSI */ - if ((sc->interrupt_mode != INTR_MODE_MSIX) - || (sc->interrupt_mode != INTR_MODE_SINGLE_MSIX)) { + if (sc->interrupt_mode == INTR_MODE_INTX || + sc->interrupt_mode == INTR_MODE_MSI) pf_conf |= IGU_PF_CONF_SINGLE_ISR_EN; - } - /* * Timers workaround bug: function init part. * Need to wait 20msec after initializing ILT, -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-20 23:41:22.981650681 +0000 +++ 0007-net-bnx2x-fix-always-true-expression.patch 2024-11-20 23:41:22.696195467 +0000 @@ -1 +1 @@ -From fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 Mon Sep 17 00:00:00 2001 +From 3b501926d5c06c24a669d0ac532b6f4e087ed6f9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 3153cc4d80..af31ac4604 100644 +index 55a91fad78..8e6d2c5c80 100644 @@ -27 +28 @@ -@@ -11189,11 +11189,9 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc) +@@ -11195,11 +11195,9 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)