]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-switch, Enable vport QoS on demand
authorDmytro Linkin <dlinkin@nvidia.com>
Tue, 21 Sep 2021 15:45:42 +0000 (18:45 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 17 Nov 2021 04:31:52 +0000 (20:31 -0800)
commit6c71fa981278f7c948d0e85b5273c3a926c532f6
treeb146edd0e1dd123307ea33c26d157e37f7e26172
parent0e1a7046597a64904b58bfb674dc0a77706b8c0e
net/mlx5: E-switch, Enable vport QoS on demand

Vports' QoS is not commonly used but consume SW/HW resources, which
becomes an issue on BlueField SoC systems.
Don't enable QoS on vports by default on eswitch mode change and enable
when it's going to be used by one of the top level users:
- configuring TC matchall filter with police action;
- setting rate with legacy NDO API;
- calling devlink ops->rate_leaf_*() callbacks.

Disable vport QoS on vport cleanup.

Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.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.c