]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: net: Add port split test
authorDanielle Ratson <danieller@mellanox.com>
Thu, 9 Jul 2020 13:18:22 +0000 (16:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Jul 2020 20:15:30 +0000 (13:15 -0700)
commit7bbe21d6ca9a12b1e604d48f48a72cde0b27163d
tree2b29fc5bcaa3787987243f649c682c642839bdaf
parent236b449ad9fee080f3b7db8dbad74718caf07930
selftests: net: Add port split test

Test port split configuration using previously added number of port lanes
attribute.

Check that all the splittable ports are successfully split to their maximum
number of lanes and below, and that those which are not splittable fail to
be split.

Test output example:

TEST: swp4 is unsplittable                                         [ OK ]
TEST: split port swp53 into 4                                      [ OK ]
TEST: Unsplit port pci/0000:03:00.0/25                             [ OK ]
TEST: split port swp53 into 2                                      [ OK ]
TEST: Unsplit port pci/0000:03:00.0/25                             [ OK ]

Signed-off-by: Danielle Ratson <danieller@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/devlink_port_split.py [new file with mode: 0755]