aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/lib/py/utils.py
diff options
context:
space:
mode:
authorShahar Shitrit <[email protected]>2025-02-19 11:41:09 +0000
committerJakub Kicinski <[email protected]>2025-02-21 01:36:08 +0000
commit5246fd3fc232f50987dad73ffd9ded1f40f1e6f6 (patch)
treeafc12a34e85c3ff221962e022406caaf611dd32f /tools/testing/selftests/net/lib/py/utils.py
parentnet/mlx5: Bridge, correct config option description (diff)
downloadkernel-5246fd3fc232f50987dad73ffd9ded1f40f1e6f6.tar.gz
kernel-5246fd3fc232f50987dad73ffd9ded1f40f1e6f6.zip
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 <[email protected]> Reviewed-by: Carolina Jubran <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions