* [PATCH net] bnxt_en: Fix the resource check condition for RSS contexts
@ 2024-07-03 18:01 Michael Chan
2024-07-04 9:20 ` Simon Horman
2024-07-04 14:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Michael Chan @ 2024-07-03 18:01 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, kuba, pabeni, pavan.chebbi, andrew.gospodarek
[-- Attachment #1: Type: text/plain, Size: 2194 bytes --]
From: Pavan Chebbi <pavan.chebbi@broadcom.com>
While creating a new RSS context, bnxt_rfs_capable() currently
makes a strict check to see if the required VNICs are already
available. If the current VNICs are not what is required,
either too many or not enough, it will call the firmware to
reserve the exact number required.
There is a bug in the firmware when the driver tries to
relinquish some reserved VNICs and RSS contexts. It will
cause the default VNIC to lose its RSS configuration and
cause receive packets to be placed incorrectly.
Workaround this problem by skipping the resource reduction.
The driver will not reduce the VNIC and RSS context reservations
when a context is deleted. The resources will be available for
use when new contexts are created later.
Potentially, this workaround can cause us to run out of VNIC
and RSS contexts if there are a lot of VF functions creating
and deleting RSS contexts. In the future, we will conditionally
disable this workaround when the firmware fix is available.
Fixes: 438ba39b25fe ("bnxt_en: Improve RSS context reservation infrastructure")
Reported-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/netdev/20240625010210.2002310-1-kuba@kernel.org/
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index a6d69a45fa01..53085058100c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -12669,7 +12669,11 @@ bool bnxt_rfs_capable(struct bnxt *bp, bool new_rss_ctx)
if (!BNXT_NEW_RM(bp))
return true;
- if (hwr.vnic == bp->hw_resc.resv_vnics &&
+ /* Do not reduce VNIC and RSS ctx reservations. There is a FW
+ * issue that will mess up the default VNIC if we reduce the
+ * reservations.
+ */
+ if (hwr.vnic <= bp->hw_resc.resv_vnics &&
hwr.rss_ctx <= bp->hw_resc.resv_rsscos_ctxs)
return true;
--
2.30.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] bnxt_en: Fix the resource check condition for RSS contexts
2024-07-03 18:01 [PATCH net] bnxt_en: Fix the resource check condition for RSS contexts Michael Chan
@ 2024-07-04 9:20 ` Simon Horman
2024-07-04 14:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-07-04 9:20 UTC (permalink / raw)
To: Michael Chan
Cc: davem, netdev, edumazet, kuba, pabeni, pavan.chebbi,
andrew.gospodarek
On Wed, Jul 03, 2024 at 11:01:12AM -0700, Michael Chan wrote:
> From: Pavan Chebbi <pavan.chebbi@broadcom.com>
>
> While creating a new RSS context, bnxt_rfs_capable() currently
> makes a strict check to see if the required VNICs are already
> available. If the current VNICs are not what is required,
> either too many or not enough, it will call the firmware to
> reserve the exact number required.
>
> There is a bug in the firmware when the driver tries to
> relinquish some reserved VNICs and RSS contexts. It will
> cause the default VNIC to lose its RSS configuration and
> cause receive packets to be placed incorrectly.
>
> Workaround this problem by skipping the resource reduction.
> The driver will not reduce the VNIC and RSS context reservations
> when a context is deleted. The resources will be available for
> use when new contexts are created later.
>
> Potentially, this workaround can cause us to run out of VNIC
> and RSS contexts if there are a lot of VF functions creating
> and deleting RSS contexts. In the future, we will conditionally
> disable this workaround when the firmware fix is available.
>
> Fixes: 438ba39b25fe ("bnxt_en: Improve RSS context reservation infrastructure")
> Reported-by: Jakub Kicinski <kuba@kernel.org>
> Link: https://lore.kernel.org/netdev/20240625010210.2002310-1-kuba@kernel.org/
> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
> Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] bnxt_en: Fix the resource check condition for RSS contexts
2024-07-03 18:01 [PATCH net] bnxt_en: Fix the resource check condition for RSS contexts Michael Chan
2024-07-04 9:20 ` Simon Horman
@ 2024-07-04 14:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-04 14:50 UTC (permalink / raw)
To: Michael Chan
Cc: davem, netdev, edumazet, kuba, pabeni, pavan.chebbi,
andrew.gospodarek
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 3 Jul 2024 11:01:12 -0700 you wrote:
> From: Pavan Chebbi <pavan.chebbi@broadcom.com>
>
> While creating a new RSS context, bnxt_rfs_capable() currently
> makes a strict check to see if the required VNICs are already
> available. If the current VNICs are not what is required,
> either too many or not enough, it will call the firmware to
> reserve the exact number required.
>
> [...]
Here is the summary with links:
- [net] bnxt_en: Fix the resource check condition for RSS contexts
https://git.kernel.org/netdev/net/c/5d350dc3429b
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] 3+ messages in thread
end of thread, other threads:[~2024-07-04 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 18:01 [PATCH net] bnxt_en: Fix the resource check condition for RSS contexts Michael Chan
2024-07-04 9:20 ` Simon Horman
2024-07-04 14:50 ` 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).