Skip to contentSkip to conversation

selftests: drv-net: hide the devlink port_split test

PATCH Superseded Jakub Kicinski 2 participants 3 messages Aug 8 – Aug 10

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 selftests: drv-net: hide the devlink port_split test

The devlink port_split test has limited applicability. NICs (as opposed to switches) require at least a re-probe to apply the split configuration.

On top of that the test is not compatible with our driver env, it just splits all ports on the system, not only what NETIF points at.

Long term we may want to add some indication in devlink whether the port splitting is runtime (cmode of sorts), and fix the test to follow driver env. But since no (known) NIC driver can support runtime anyway let's just hide the test from the selftest framework by moving it to extra files.

Having this test randomly break unrelated NICs within the DUT makes people implement allow-lists for ksft, which then means their setups don't run new tests.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 tools/testing/selftests/drivers/net/hw/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/hw/Makefile +1 -1
index 234db5c2c90c..ab13f58d703e 100644
@@ -19,7 +19,6 @@ TEST_GEN_FILES := \
 
 TEST_PROGS = \
 	csum.py \
-	devlink_port_split.py \
 	devlink_rate_cross_esw.py \
 	devlink_rate_tc_bw.py \
 	devmem.py \
@@ -55,6 +54,7 @@ TEST_PROGS = \
 	#
 
 TEST_FILES := \
+	devlink_port_split.py \
 	devmem_lib.py \
 	ethtool_lib.sh \
 	#
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jakub Kicinski

The devlink port_split test has limited applicability. NICs (as opposed to switches) require at least a re-probe to apply the split configuration.

Interesting, apparently some NICs require reboot after devlink port split. Hmm, should I just move the test to drivers/mlxsw?

Quoted 9 lines

On top of that the test is not compatible with our driver env, it just splits all ports on the system, not only what NETIF points at.

Long term we may want to add some indication in devlink whether the port splitting is runtime (cmode of sorts), and fix the test to follow driver env. But since no (known) NIC driver can support runtime anyway let's just hide the test from the selftest framework by moving it to extra files.

Sure, go for it.

Quoted 3 lines

Having this test randomly break unrelated NICs within the DUT makes people implement allow-lists for ksft, which then means their setups don't run new tests.

So I'm fine with the patch, but I don't buy this argument. People presumably understand that allow-listing implies that only the, well, allowed tests will be run. Presumably there was a history of new stuff blowing up, or gradual enablement or whatever, otherwise why not just blacklist the one problematic one? I.e. don't blame the existence of allow-lists on devlink_port_split.

Quoted 1 line
Quoted 29 lines

---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 tools/testing/selftests/drivers/net/hw/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/hw/Makefile +1 -1
index 234db5c2c90c..ab13f58d703e 100644
@@ -19,7 +19,6 @@ TEST_GEN_FILES := \
 
 TEST_PROGS = \
 	csum.py \
-	devlink_port_split.py \
 	devlink_rate_cross_esw.py \
 	devlink_rate_tc_bw.py \
 	devmem.py \
@@ -55,6 +54,7 @@ TEST_PROGS = \
 	#
 
 TEST_FILES := \
+	devlink_port_split.py \
 	devmem_lib.py \
 	ethtool_lib.sh \
 	#
author maintainer
#2 lore raw
Quoted 6 lines · On Mon, 10 Aug 2026 13:04:48 +0200 Petr Machata wrote:
Quoted 3 lines

The devlink port_split test has limited applicability. NICs (as opposed to switches) require at least a re-probe to apply the split configuration.

Interesting, apparently some NICs require reboot after devlink port split. Hmm, should I just move the test to drivers/mlxsw?

It's not really mlxsw specific in any way :S
The cmode + NETIF compatibility would be my long term preference.

Quoted 12 lines
Quoted 9 lines

On top of that the test is not compatible with our driver env, it just splits all ports on the system, not only what NETIF points at.

Long term we may want to add some indication in devlink whether the port splitting is runtime (cmode of sorts), and fix the test to follow driver env. But since no (known) NIC driver can support runtime anyway let's just hide the test from the selftest framework by moving it to extra files.

Sure, go for it.

Quoted 7 lines
Quoted 3 lines

Having this test randomly break unrelated NICs within the DUT makes people implement allow-lists for ksft, which then means their setups don't run new tests.

So I'm fine with the patch, but I don't buy this argument. People presumably understand that allow-listing implies that only the, well, allowed tests will be run.

One note here - that's a fine position to take for downstream CIs. But upstream / in NIPA we want to test the drivers as much as we want to test the tests. It's _very_ useful during review to see how well the test works across the runners before merging. So allowlists are explicitly a no-no for NIPA reporting.

Quoted 4 lines

Presumably there was a history of new stuff
blowing up, or gradual enablement or whatever, otherwise why not just blacklist the one problematic one? I.e. don't blame the existence of allow-lists on devlink_port_split.

IIRC Intel devs mentioned port split as problematic explicitly. I also had issues with it in NIPA.

But fair point, maybe once the auto-neg / link config tests appear upstream this will be more prevalent problem. For now devlink port split is the only one.. let's just squirrel it away.

Quoted 1 line

Thanks! I may need to respin and use PROGS_EXTENDED as AI suggests.