bnxt_en: Fix the resource check condition for RSS contexts
Michael Chan
maintainerPATCH 1/1 bnxt_en: Fix the resource check condition for RSS contexts
From: Pavan Chebbi <[email protected]>
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.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +5 -1
@@ -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;
Signature · 1 line
2.30.1
Quoted 23 lines · Michael Chan
From: Pavan Chebbi <[email protected]>
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.
Quoted 6 lines
Fixes 438ba39b25fe ("bnxt_en: Improve RSS context reservation infrastructure")Reported-by Jakub Kicinski <[email protected]>Reviewed-by Andy Gospodarek <[email protected]>Signed-off-by Pavan Chebbi <[email protected]>Signed-off-by Michael Chan <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Wed, 3 Jul 2024 11:01:12 -0700 you wrote:
From: Pavan Chebbi <[email protected]>
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html