* [PATCH] qed: Fix the VF msix vectors flow
@ 2021-08-22 19:21 Shai Malin
2021-08-24 8:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Shai Malin @ 2021-08-22 19:21 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: aelior, smalin, malin1024, Prabhakar Kushwaha
For VFs we should return with an error in case we didn't get the exact
number of msix vectors as we requested.
Not doing that will lead to a crash when starting queues for this VF.
Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Shai Malin <smalin@marvell.com>
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 6871d892eabf..15ef59aa34ff 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -615,7 +615,12 @@ static int qed_enable_msix(struct qed_dev *cdev,
rc = cnt;
}
- if (rc > 0) {
+ /* For VFs, we should return with an error in case we didn't get the
+ * exact number of msix vectors as we requested.
+ * Not doing that will lead to a crash when starting queues for
+ * this VF.
+ */
+ if ((IS_PF(cdev) && rc > 0) || (IS_VF(cdev) && rc == cnt)) {
/* MSI-x configuration was achieved */
int_params->out.int_mode = QED_INT_MODE_MSIX;
int_params->out.num_vectors = rc;
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] qed: Fix the VF msix vectors flow
2021-08-22 19:21 [PATCH] qed: Fix the VF msix vectors flow Shai Malin
@ 2021-08-24 8:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-24 8:30 UTC (permalink / raw)
To: Shai Malin; +Cc: netdev, davem, kuba, aelior, malin1024, pkushwaha
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Sun, 22 Aug 2021 22:21:14 +0300 you wrote:
> For VFs we should return with an error in case we didn't get the exact
> number of msix vectors as we requested.
> Not doing that will lead to a crash when starting queues for this VF.
>
> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
> Signed-off-by: Ariel Elior <aelior@marvell.com>
> Signed-off-by: Shai Malin <smalin@marvell.com>
>
> [...]
Here is the summary with links:
- qed: Fix the VF msix vectors flow
https://git.kernel.org/netdev/net/c/b0cd08537db8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-24 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-22 19:21 [PATCH] qed: Fix the VF msix vectors flow Shai Malin
2021-08-24 8:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).