net/mlx5e: Check support before TC swap in ETS init
authorTariq Toukan <tariqt@mellanox.com>
Tue, 10 Oct 2017 13:54:30 +0000 (16:54 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 12 Jan 2018 00:01:49 +0000 (02:01 +0200)
commit4b7d4363f14a0398eca48c7e96e46120c5eb6a96
tree9c55eb549f8728730ce2b9250ecb21be0ff2921c
parent97c8c3aa48ca8eb85d1806e08f882f90d78b1856
net/mlx5e: Check support before TC swap in ETS init

Should not do the following swap between TCs 0 and 1
when max num of TCs is 1:
tclass[prio=0]=1, tclass[prio=1]=0, tclass[prio=i]=i (for i>1)

Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c