]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: DCBNL, Implement tc with ets type and zero bandwidth
authorHuy Nguyen <huyn@mellanox.com>
Thu, 28 Sep 2017 20:33:50 +0000 (15:33 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Oct 2017 07:47:27 +0000 (00:47 -0700)
commit3740cbc5cefed2c8a59596a31a1a2511a5f02fb6
tree72e160e5ba28cb3c2aa1b33dfd085acde2ba213b
parent4b70e2c68ddde2e09f55db93c03a70725c5d6336
net/mlx5e: DCBNL, Implement tc with ets type and zero bandwidth

Previously, tc with ets type and zero bandwidth is not accepted
by driver. This behavior does not follow the IEEE802.1qaz spec.

If there are tcs with ets type and zero bandwidth, these tcs are
assigned to the lowest priority tc_group #0. We equally distribute
100% bw of the tc_group #0 to these zero bandwidth ets tcs.
Also, the non zero bandwidth ets tcs are assigned to tc_group #1.

If there is no zero bandwidth ets tc, the non zero bandwidth ets tcs
are assigned to tc_group #0.

Fixes: 222d5c5e95bc ("net/mlx5e: Validate BW weight values of ETS")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
drivers/net/ethernet/mellanox/mlx5/core/port.c
include/linux/mlx5/port.h