]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/mlx5: Simplify QoS normalization by removing error handling
authorCarolina Jubran <cjubran@nvidia.com>
Thu, 7 Nov 2024 19:43:47 +0000 (21:43 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Nov 2024 03:28:17 +0000 (19:28 -0800)
commit5a731857656e3988935108f48800cd764a550005
tree8f26afb09a6c6297dc0ff1150ba4edebb6be6417
parentab85ebf437231ceaf359c2a4679bebd7e8d6bdb2
net/mlx5: Simplify QoS normalization by removing error handling

This change updates esw_qos_normalize_min_rate to not return errors,
significantly simplifying the code.

Normalization failures are software bugs, and it's unnecessary to
handle them with rollback mechanisms. Instead,
`esw_qos_update_sched_node_bw_share` and `esw_qos_normalize_min_rate`
now return void, with any errors logged as warnings to indicate
potential software issues.

This approach avoids compensating for hidden bugs and removes error
handling from all places that perform normalization, streamlining
future patches.

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-3-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c