]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx5: qos: Drop 'esw' param from vport qos functions
authorCosmin Ratiu <cratiu@nvidia.com>
Tue, 8 Oct 2024 18:32:15 +0000 (21:32 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 10 Oct 2024 11:11:59 +0000 (13:11 +0200)
commite9fa32f110867655eb396cef1f35b66278e53051
treee1cc971d89c1a91e7e6a617406cd7782c8c421fe
parenta87a561b802a45d37bc34e5a8e4f57a213ea713f
net/mlx5: qos: Drop 'esw' param from vport qos functions

The vport has a pointer to its own eswitch in vport->dev->priv.eswitch,
so passing the same eswitch as a parameter to the various functions
manipulating vport qos is superfluous at best and prone to errors at
worst.

More importantly, with the upcoming cross-esw scheduling changes, the
eswitch that should receive the various scheduling element commands is
NOT the same as the vport's eswitch, so the current code's assumptions
will break.

To avoid confusion and bugs, this commit drops the 'esw' parameter from
all vport qos functions and uses the vport's own eswitch pointer
instead.

Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
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
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c