OSDN Git Service

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)
commitf3348a82e72795ce218264fd00ef5cf5137836a9
tree2b29fc5bcaa3787987243f649c682c642839bdaf
parent82901ad16905832b7a79ff4316302bb59ec4b4ba
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]