]> git.baikalelectronics.ru Git - kernel.git/commit
net: selftests: Add lanes setting test
authorDanielle Ratson <danieller@nvidia.com>
Tue, 2 Feb 2021 18:06:12 +0000 (20:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Feb 2021 02:37:29 +0000 (18:37 -0800)
commitd119dd7c8ddf0bc50e3eb9c3c4aab199bd2e1b24
treed70a38d26d064f2043d4199f8ded08ad899fcbd8
parent313c5e1addfe52212995cfddb2e08b7dff7fd2a8
net: selftests: Add lanes setting test

Test that setting lanes parameter is working.

Set max speed and max lanes in the list of advertised link modes,
and then try to set max speed with the lanes below max lanes if exists
in the list.

And then, test that setting number of lanes larger than max lanes fails.

Do the above for both autoneg on and off.

$ ./ethtool_lanes.sh

TEST: 4 lanes is autonegotiated                                     [ OK ]
TEST: Lanes number larger than max width is not set                 [ OK ]
TEST: Autoneg off, 4 lanes detected during force mode               [ OK ]
TEST: Lanes number larger than max width is not set                 [ OK ]

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh [new file with mode: 0755]
tools/testing/selftests/net/forwarding/ethtool_lib.sh
tools/testing/selftests/net/forwarding/lib.sh