bnxt_en: Check additional resources in bnxt_check_rings()
bnxt_check_rings() is called to check if we have enough resource assets to satisfy the new number of ethtool channels. If the asset test fails, the ethtool operation will fail gracefully. Otherwise we will proceed and commit to use the new number of channels. If it fails to allocate any resources, the chip will fail to come up. For completeness, check all possible resources before committing to the new settings. Add the missing ring group and RSS context asset tests in bnxt_check_rings(). Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>pull/981/head
parent
438ba39b25
commit
9294299867
|
|
@ -13339,6 +13339,8 @@ int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs,
|
|||
if (BNXT_NEW_RM(bp)) {
|
||||
hwr.cp += bnxt_get_ulp_msix_num(bp);
|
||||
hwr.stat += bnxt_get_ulp_stat_ctxs(bp);
|
||||
hwr.grp = rx;
|
||||
hwr.rss_ctx = bnxt_get_total_rss_ctxs(bp, &hwr);
|
||||
}
|
||||
if (bp->flags & BNXT_FLAG_CHIP_P5_PLUS)
|
||||
hwr.cp_p5 = hwr.tx + rx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue