net/mlx5: E-switch, Allow to add vports to rate groups
authorDmytro Linkin <dlinkin@nvidia.com>
Tue, 1 Jun 2021 09:37:39 +0000 (12:37 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 20 Aug 2021 04:50:40 +0000 (21:50 -0700)
commit0fe132eac38cf20fc584c7537e62a11415788269
tree7341f6428c66ba568750d0254c01377a69b48d1e
parentf47e04eb96e02e6bd870dd5ce5da1d612b43b28d
net/mlx5: E-switch, Allow to add vports to rate groups

Implement eswitch API that allows updating rate groups. If group
pointer is NULL, then move the vport to internal unlimited group zero.

Implement devlink_ops->rate_parent_node_set() callback in the terms of
the new eswitch group update API.

Enable QoS for all group's elements if a group has allocated BW share.

Co-developed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Huy Nguyen <huyn@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h