mirror of https://gitee.com/openkylin/linux.git
bnxt_en: Don't set ETS on unused TCs.
Currently, the code allows ETS bandwidth weight 0 to be set on unused TCs. We should not set any DCB parameters on unused TCs at all. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e37fed7903
commit
24654f095e
|
@ -471,7 +471,10 @@ static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc)
|
|||
if (total_ets_bw > 100)
|
||||
return -EINVAL;
|
||||
|
||||
*tc = max_tc + 1;
|
||||
if (max_tc >= bp->max_tc)
|
||||
*tc = bp->max_tc;
|
||||
else
|
||||
*tc = max_tc + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue