net/mlx5: E-switch, Respect BW share of the new group
authorDmytro Linkin <dlinkin@nvidia.com>
Tue, 21 Sep 2021 12:47:33 +0000 (15:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:53 +0000 (09:04 +0100)
commit301c7519106d9398b5d33e12daaabb4172a6c2db
tree56c118c0d75ec434423e56d33bf6116759f9ea90
parent3f8887350191405155d7ead4e819324f8984191d
net/mlx5: E-switch, Respect BW share of the new group

[ Upstream commit 1e59b32e45e47c8ea5455182286ba010bfa87813 ]

To enable transmit schduler on vport FW require non-zero configuration
for vport's TSAR. If vport added to the group which has configured BW
share value and TX rate values of the vport are zero, then scheduler
wouldn't be enabled on this vport.
Fix that by calling BW normalization if BW share of the new group is
configured.

Fixes: 0fe132eac38c ("net/mlx5: E-switch, Allow to add vports to rate groups")
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c