patch 'net/bnx2x: fix always true expression' has been queued to stable release 22.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 21 00:41:32 CET 2024
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 <stephen at networkplumber.org>
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 <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 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 at 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)
More information about the stable
mailing list