summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/lib/py/utils.py
diff options
context:
space:
mode:
authorShahar Shitrit <shshitrit@nvidia.com>2025-02-19 13:41:09 +0200
committerJakub Kicinski <kuba@kernel.org>2025-02-20 17:36:08 -0800
commit5246fd3fc232f50987dad73ffd9ded1f40f1e6f6 (patch)
treeafc12a34e85c3ff221962e022406caaf611dd32f /tools/testing/selftests/net/lib/py/utils.py
parent3fe090ad025082556491604a4761cad87d7529da (diff)
net/mlx5e: Refactor ptys2ethtool_adver_link()
The function ptys2ethtool_adver_link() contains duplicated code that is found in mlx5e_ethtool_get_speed_arr(). To eliminate this redundancy, we update mlx5e_ethtool_get_speed_arr() to select the appropriate table based on the ext argument passed by the caller, rather than querying the supported mode locally. This allows us to replace the current logic in ptys2ethtool_adver_link() with a call to mlx5e_ethtool_get_speed_arr(). This adjustment aligns with the ptys2ethtool_supported_link() function and prepares for an upcoming patch that reduces code duplication. Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250219114112.403808-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions