]> git.droids-corp.org - dpdk.git/commit
net/bnxt: fix VF resource allocation strategy
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 20 Jan 2022 09:12:28 +0000 (14:42 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Tue, 25 Jan 2022 04:45:28 +0000 (05:45 +0100)
commit8496483099104c970720ae7baf5ab61aaa4611c7
tree41c83f030924d4be7afe7c6cbfb48a0e883c7dd7
parent5b8b248c9679b9571f73a75e1905d7cef39e6c6e
net/bnxt: fix VF resource allocation strategy

1. VFs need a notification queue to handle async messages.
But the current logic does not reserve a notification queue leading
to initialization failure in some cases.
2. With the current logic, DPDK PF driver reserves only one VNIC
to the VFs leading to initialization failure with more than 1 RXQs.

Added logic to distribute number of NQs and VNICs from the pool
across VFs and PF.

While reserving resources for the VFs, the strategy is to keep
both min & max values the same. This could result in a failure
when there isn't enough resources to satisfy the request.
Hence fixed to instruct the FW to not reserve all minimum
resources requested for the VF. The VF driver can request the FW
for the allocated resources during probe.

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h