patch 'net/bnx2x: fix always true expression' has been queued to stable release 23.11.3

Xueming Li xuemingl at nvidia.com
Sat Dec 7 09:00:17 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/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=12ae6d06a38b50392c85c7ccb28278e61f9f4116

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 12ae6d06a38b50392c85c7ccb28278e61f9f4116 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 12 Nov 2024 09:43:54 -0800
Subject: [PATCH] net/bnx2x: fix always true expression
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 <stephen at networkplumber.org>
---
 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 3153cc4d80..af31ac4604 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -11189,11 +11189,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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-12-06 23:26:46.026329004 +0800
+++ 0059-net-bnx2x-fix-always-true-expression.patch	2024-12-06 23:26:43.973044828 +0800
@@ -1 +1 @@
-From fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 Mon Sep 17 00:00:00 2001
+From 12ae6d06a38b50392c85c7ccb28278e61f9f4116 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit fb6b0e9a36326a4f13f496b00f7f92aaffe1d5f4 ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list