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)
commitbe0f161ef141e4df368aa3f417a1c2ab9c362e75
tree72e160e5ba28cb3c2aa1b33dfd085acde2ba213b
parent3c37745ec614ff048d5dce38f976804b05d307ee
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: cdcf11212b22 ("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