diff options
author | Michael Chan <michael.chan@broadcom.com> | 2018-12-17 02:46:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-18 10:08:53 +0300 |
commit | 24654f095ed68eafcdfdbfccbe6324ad1475c1bb (patch) | |
tree | 8010f47bde35d6db4fc2a8a5ade3aac5492401da /drivers/net/ethernet/broadcom | |
parent | e37fed790335631c57477e7bee952a039ccb7a50 (diff) | |
download | linux-24654f095ed68eafcdfdbfccbe6324ad1475c1bb.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c index a85d2be986af..15c7041e937b 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c @@ -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; } |