RE: [PATCH] bnx2x: Fix enabling network interfaces without VFs

2 messages, 2 authors, 2021-09-13 · open the first message on its own page

RE: [PATCH] bnx2x: Fix enabling network interfaces without VFs

From: Shai Malin <hidden>
Date: 2021-09-13 08:14:42

On 9/12/2021 at 10:08PM, Adrian Bunk Wrote:
quoted hunk
This function is called to enable SR-IOV when available,
not enabling interfaces without VFs was a regression.

Fixes: 65161c35554f ("bnx2x: Fix missing error code in bnx2x_iov_init_one()")
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reported-by: YunQiang Su <redacted>
Tested-by: YunQiang Su <redacted>
Cc: stable@vger.kernel.org
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index f255fd0b16db..6fbf735fca31 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1224,7 +1224,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int
int_mode_param,

 	/* SR-IOV capability was enabled but there are no VFs*/
 	if (iov->total == 0) {
-		err = -EINVAL;
+		err = 0;
 		goto failed;
 	}
Thanks for reporting this issue!
But the complete fix should also not use "goto failed".
Instead, please create a new "goto skip_vfs" so it will skip 
the log of "Failed err=".
--
2.20.1

Re: [PATCH] bnx2x: Fix enabling network interfaces without VFs

From: Adrian Bunk <bunk@kernel.org>
Date: 2021-09-13 10:50:33

On Mon, Sep 13, 2021 at 08:14:33AM +0000, Shai Malin wrote:
On 9/12/2021 at 10:08PM, Adrian Bunk Wrote:
quoted
This function is called to enable SR-IOV when available,
not enabling interfaces without VFs was a regression.

Fixes: 65161c35554f ("bnx2x: Fix missing error code in bnx2x_iov_init_one()")
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reported-by: YunQiang Su <redacted>
Tested-by: YunQiang Su <redacted>
Cc: stable@vger.kernel.org
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index f255fd0b16db..6fbf735fca31 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1224,7 +1224,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int
int_mode_param,

 	/* SR-IOV capability was enabled but there are no VFs*/
 	if (iov->total == 0) {
-		err = -EINVAL;
+		err = 0;
 		goto failed;
 	}
Thanks for reporting this issue!
But the complete fix should also not use "goto failed".
Instead, please create a new "goto skip_vfs" so it will skip 
the log of "Failed err=".
Is this really desirable?
It is a debug print not enabled by default,
and trying to enable SR-IOV did fail.

cu
Adrian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help