]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx5: Generalize scheduling element operations
authorCarolina Jubran <cjubran@nvidia.com>
Thu, 7 Nov 2024 19:43:50 +0000 (21:43 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Nov 2024 03:28:17 +0000 (19:28 -0800)
commit663bc605d0db8782ff9c2704db5ce6cf2ac7fa93
tree357b873fc9cf6ea97f653649c8c63181d9542a11
parentcc4bb15ffa8412bfe1e189d37edb6ca7d9918cb4
net/mlx5: Generalize scheduling element operations

Introduce helper functions to create and destroy scheduling elements,
allowing flexible configuration for different scheduling element types.

The new helper functions streamline the process by centralizing error
handling and logging through esw_qos_sched_elem_op_warn, which now
accepts the operation type (create, destroy, or modify).

The changes also adjust the esw_qos_vport_enable and
mlx5_esw_qos_vport_disable functions to leverage the new generalized
create/destroy helpers.

The destroy functions now log errors with esw_warn without returning
them. This prevents unnecessary error handling since the node was
already destroyed and no further action is required from callers.

Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241107194357.683732-6-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c