Skip to content

Commit b74c2a2

Browse files
Shravya KNkuba-moo
authored andcommitted
bnxt_en: Fix DCB ETS validation
In bnxt_ets_validate(), the code incorrectly loops over all possible traffic classes to check and add the ETS settings. Fix it to loop over the configured traffic classes only. The unconfigured traffic classes will default to TSA_ETS with 0 bandwidth. Looping over these unconfigured traffic classes may cause the validation to fail and trigger this error message: "rejecting ETS config starving a TC\n" The .ieee_setets() will then fail. Fixes: 7df4ae9 ("bnxt_en: Implement DCBNL to support host-based DCBX.") Reviewed-by: Sreekanth Reddy <[email protected]> Signed-off-by: Shravya KN <[email protected]> Signed-off-by: Michael Chan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e81750b commit b74c2a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,9 @@ static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc)
487487

488488
if ((ets->tc_tx_bw[i] || ets->tc_tsa[i]) && i > bp->max_tc)
489489
return -EINVAL;
490+
}
490491

492+
for (i = 0; i < max_tc; i++) {
491493
switch (ets->tc_tsa[i]) {
492494
case IEEE_8021QAZ_TSA_STRICT:
493495
break;

0 commit comments

Comments
 (0)