* [PATCH v1] dts: make one link the default topology
@ 2025-07-23 13:50 Dean Marx
2025-07-28 12:15 ` Luca Vizzarro
` (2 more replies)
0 siblings, 3 replies; 26+ messages in thread
From: Dean Marx @ 2025-07-23 13:50 UTC (permalink / raw)
To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli,
paul.szczepanek
Cc: dev, Dean Marx
Currently the default topology for test suites when not specified
is two link, which causes all one link test runs to skip.
This makes writing test suites less flexible for a user
who doesn't add a topology requirement, so changing this
to one link reduces barriers to getting a test suite
running quickly.
Bugzilla ID: 1759
Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
dts/framework/testbed_model/topology.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dts/framework/testbed_model/topology.py b/dts/framework/testbed_model/topology.py
index 899ea0ad3a..9f21520bbb 100644
--- a/dts/framework/testbed_model/topology.py
+++ b/dts/framework/testbed_model/topology.py
@@ -35,7 +35,7 @@ class TopologyType(int, Enum):
@classmethod
def default(cls) -> "TopologyType":
"""The default topology required by test cases if not specified otherwise."""
- return cls.two_links
+ return cls.one_link
class PortLink(NamedTuple):
--
2.50.1
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v1] dts: make one link the default topology 2025-07-23 13:50 [PATCH v1] dts: make one link the default topology Dean Marx @ 2025-07-28 12:15 ` Luca Vizzarro 2025-08-07 14:07 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Dean Marx 2025-11-21 19:55 ` [PATCH v4 " Andrew Bailey 2 siblings, 0 replies; 26+ messages in thread From: Luca Vizzarro @ 2025-07-28 12:15 UTC (permalink / raw) To: Dean Marx, probb, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek; +Cc: dev Looks good to me. Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com> ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v2 1/2] dts: rewrite two link topology requirements 2025-07-23 13:50 [PATCH v1] dts: make one link the default topology Dean Marx 2025-07-28 12:15 ` Luca Vizzarro @ 2025-08-07 14:07 ` Dean Marx 2025-08-07 14:07 ` [PATCH v2 2/2] dts: make one link the default topology Dean Marx ` (3 more replies) 2025-11-21 19:55 ` [PATCH v4 " Andrew Bailey 2 siblings, 4 replies; 26+ messages in thread From: Dean Marx @ 2025-08-07 14:07 UTC (permalink / raw) To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek Cc: dev, Dean Marx Some of the DTS test suites require two link topologies in order to run, but not all truly require two links for proper testing. Rewrite the topology requirements on these test suites to reflect the actual requirements. Bugzilla ID: 1755 Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- dts/tests/TestSuite_blocklist.py | 3 ++- dts/tests/TestSuite_checksum_offload.py | 2 +- dts/tests/TestSuite_dynamic_config.py | 2 +- dts/tests/TestSuite_port_control.py | 2 +- dts/tests/TestSuite_uni_pkt.py | 2 +- dts/tests/TestSuite_vlan.py | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blocklist.py index ce7da1cc8f..c75be247b5 100644 --- a/dts/tests/TestSuite_blocklist.py +++ b/dts/tests/TestSuite_blocklist.py @@ -12,7 +12,7 @@ from framework.testbed_model.port import Port -@requires(topology_type=TopologyType.two_links) +@requires(topology_type=TopologyType.one_link) class TestBlocklist(TestSuite): """DPDK device blocklisting test suite.""" @@ -51,6 +51,7 @@ def one_port_blocklisted(self): """ self.verify_blocklisted_ports(self.topology.sut_ports[:1]) + @requires(topology_type=TopologyType.two_links) @func_test def all_but_one_port_blocklisted(self): """Run testpmd with all but one blocklisted port. diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py index c9efdcaa1c..54606676d5 100644 --- a/dts/tests/TestSuite_checksum_offload.py +++ b/dts/tests/TestSuite_checksum_offload.py @@ -29,7 +29,7 @@ from framework.testbed_model.capability import NicCapability, TopologyType, requires -@requires(topology_type=TopologyType.two_links) +@requires(topology_type=TopologyType.one_link) @requires(NicCapability.RX_OFFLOAD_IPV4_CKSUM) @requires(NicCapability.RX_OFFLOAD_UDP_CKSUM) @requires(NicCapability.RX_OFFLOAD_TCP_CKSUM) diff --git a/dts/tests/TestSuite_dynamic_config.py b/dts/tests/TestSuite_dynamic_config.py index 49f295a39a..f713cbf945 100644 --- a/dts/tests/TestSuite_dynamic_config.py +++ b/dts/tests/TestSuite_dynamic_config.py @@ -26,7 +26,7 @@ @requires(NicCapability.PHYSICAL_FUNCTION) -@requires(topology_type=TopologyType.two_links) +@requires(topology_type=TopologyType.one_link) class TestDynamicConfig(TestSuite): """Dynamic config suite. diff --git a/dts/tests/TestSuite_port_control.py b/dts/tests/TestSuite_port_control.py index 58783f1d18..c117b8b7ca 100644 --- a/dts/tests/TestSuite_port_control.py +++ b/dts/tests/TestSuite_port_control.py @@ -19,7 +19,7 @@ @requires(NicCapability.PHYSICAL_FUNCTION) -@requires(topology_type=TopologyType.two_links) +@requires(topology_type=TopologyType.one_link) class TestPortControl(TestSuite): """DPDK Port Control Testing Suite.""" diff --git a/dts/tests/TestSuite_uni_pkt.py b/dts/tests/TestSuite_uni_pkt.py index 690c5d4fd1..c767ecdeb0 100644 --- a/dts/tests/TestSuite_uni_pkt.py +++ b/dts/tests/TestSuite_uni_pkt.py @@ -30,7 +30,7 @@ from framework.testbed_model.capability import TopologyType, requires -@requires(topology_type=TopologyType.two_links) +@requires(topology_type=TopologyType.one_link) class TestUniPkt(TestSuite): """DPDK Unified packet test suite. diff --git a/dts/tests/TestSuite_vlan.py b/dts/tests/TestSuite_vlan.py index d2a9e614d4..56ef8c431e 100644 --- a/dts/tests/TestSuite_vlan.py +++ b/dts/tests/TestSuite_vlan.py @@ -21,7 +21,7 @@ @requires(NicCapability.RX_OFFLOAD_VLAN_FILTER) -@requires(topology_type=TopologyType.two_links) +@requires(topology_type=TopologyType.one_link) class TestVlan(TestSuite): """DPDK VLAN test suite. -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v2 2/2] dts: make one link the default topology 2025-08-07 14:07 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Dean Marx @ 2025-08-07 14:07 ` Dean Marx 2025-08-11 10:47 ` Luca Vizzarro 2025-08-11 10:47 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Luca Vizzarro ` (2 subsequent siblings) 3 siblings, 1 reply; 26+ messages in thread From: Dean Marx @ 2025-08-07 14:07 UTC (permalink / raw) To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek Cc: dev, Dean Marx Currently the default topology for test suites when not specified is two link, which causes all one link test runs to skip. This makes writing test suites less flexible for a user who doesn't add a topology requirement, so changing this to one link reduces barriers to getting a test suite running quickly. Bugzilla ID: 1759 Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- dts/framework/testbed_model/topology.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/framework/testbed_model/topology.py b/dts/framework/testbed_model/topology.py index 899ea0ad3a..9f21520bbb 100644 --- a/dts/framework/testbed_model/topology.py +++ b/dts/framework/testbed_model/topology.py @@ -35,7 +35,7 @@ class TopologyType(int, Enum): @classmethod def default(cls) -> "TopologyType": """The default topology required by test cases if not specified otherwise.""" - return cls.two_links + return cls.one_link class PortLink(NamedTuple): -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v2 2/2] dts: make one link the default topology 2025-08-07 14:07 ` [PATCH v2 2/2] dts: make one link the default topology Dean Marx @ 2025-08-11 10:47 ` Luca Vizzarro 0 siblings, 0 replies; 26+ messages in thread From: Luca Vizzarro @ 2025-08-11 10:47 UTC (permalink / raw) To: Dean Marx, probb, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek; +Cc: dev Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com> ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v2 1/2] dts: rewrite two link topology requirements 2025-08-07 14:07 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Dean Marx 2025-08-07 14:07 ` [PATCH v2 2/2] dts: make one link the default topology Dean Marx @ 2025-08-11 10:47 ` Luca Vizzarro 2025-08-11 10:50 ` Luca Vizzarro 2025-08-20 14:06 ` [PATCH v3 0/2] dts: change default topology to one link Dean Marx 3 siblings, 0 replies; 26+ messages in thread From: Luca Vizzarro @ 2025-08-11 10:47 UTC (permalink / raw) To: Dean Marx, probb, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek; +Cc: dev On 07/08/2025 15:07, Dean Marx wrote: > diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blocklist.py > index ce7da1cc8f..c75be247b5 100644 > --- a/dts/tests/TestSuite_blocklist.py > +++ b/dts/tests/TestSuite_blocklist.py > @@ -12,7 +12,7 @@ > from framework.testbed_model.port import Port > > > -@requires(topology_type=TopologyType.two_links) > +@requires(topology_type=TopologyType.one_link) > class TestBlocklist(TestSuite): > """DPDK device blocklisting test suite.""" > > @@ -51,6 +51,7 @@ def one_port_blocklisted(self): > """ > self.verify_blocklisted_ports(self.topology.sut_ports[:1]) > > + @requires(topology_type=TopologyType.two_links) I am guessing by the logic of this then one_port_blocklisted could also use it.> @func_test > def all_but_one_port_blocklisted(self): > """Run testpmd with all but one blocklisted port. Would it make more sense to swap the order of the commits? This is because adding an explicit @requires for one_link becomes redundant. I'd probably change the default and then allow all the test suites that are happy with one link to just remove the two link requirement. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v2 1/2] dts: rewrite two link topology requirements 2025-08-07 14:07 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Dean Marx 2025-08-07 14:07 ` [PATCH v2 2/2] dts: make one link the default topology Dean Marx 2025-08-11 10:47 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Luca Vizzarro @ 2025-08-11 10:50 ` Luca Vizzarro 2025-08-20 14:06 ` [PATCH v3 0/2] dts: change default topology to one link Dean Marx 3 siblings, 0 replies; 26+ messages in thread From: Luca Vizzarro @ 2025-08-11 10:50 UTC (permalink / raw) To: Dean Marx, probb, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek; +Cc: dev Between patches a lot can happen, and a long wait time can make it worse. It is useful to explain the changes between versions. Please review the contributing guidelines around adding cover letters or annotating single patches: https://doc.dpdk.org/guides/contributing/patches.html#creating-patches ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 0/2] dts: change default topology to one link 2025-08-07 14:07 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Dean Marx ` (2 preceding siblings ...) 2025-08-11 10:50 ` Luca Vizzarro @ 2025-08-20 14:06 ` Dean Marx 2025-08-20 14:06 ` [PATCH v3 1/2] dts: make one link the default topology Dean Marx ` (3 more replies) 3 siblings, 4 replies; 26+ messages in thread From: Dean Marx @ 2025-08-20 14:06 UTC (permalink / raw) To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek Cc: dev, Dean Marx Currently, when the topology of a test suite is not specified, it defaults to two_link. This may be counterintuitive to users, and can slow down the process of getting a test suite running. This series changes the default to one_link, and refactors the topology decorators accordingly. Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- v2: * Grouped one_link default and two_link requirements patches v3: * Remove one_link suite decorators * Add two_link requirement to one_port_blocklisted case Dean Marx (2): dts: make one link the default topology dts: rewrite two link topology requirements dts/framework/testbed_model/topology.py | 2 +- dts/tests/TestSuite_blocklist.py | 4 +++- dts/tests/TestSuite_checksum_offload.py | 2 +- dts/tests/TestSuite_dynamic_config.py | 2 +- dts/tests/TestSuite_port_control.py | 2 +- dts/tests/TestSuite_uni_pkt.py | 2 +- dts/tests/TestSuite_vlan.py | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) -- 2.50.1 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 1/2] dts: make one link the default topology 2025-08-20 14:06 ` [PATCH v3 0/2] dts: change default topology to one link Dean Marx @ 2025-08-20 14:06 ` Dean Marx 2025-08-28 2:11 ` Patrick Robb 2025-08-20 14:06 ` [PATCH v3 2/2] dts: rewrite two link topology requirements Dean Marx ` (2 subsequent siblings) 3 siblings, 1 reply; 26+ messages in thread From: Dean Marx @ 2025-08-20 14:06 UTC (permalink / raw) To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek Cc: dev, Dean Marx Currently the default topology for test suites when not specified is two link, which causes all one link test runs to skip. This makes writing test suites less flexible for a user who doesn't add a topology requirement, so changing this to one link reduces barriers to getting a test suite running quickly. Bugzilla ID: 1759 Signed-off-by: Dean Marx <dmarx@iol.unh.edu> Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com> --- dts/framework/testbed_model/topology.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/framework/testbed_model/topology.py b/dts/framework/testbed_model/topology.py index 899ea0ad3a..9f21520bbb 100644 --- a/dts/framework/testbed_model/topology.py +++ b/dts/framework/testbed_model/topology.py @@ -35,7 +35,7 @@ class TopologyType(int, Enum): @classmethod def default(cls) -> "TopologyType": """The default topology required by test cases if not specified otherwise.""" - return cls.two_links + return cls.one_link class PortLink(NamedTuple): -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v3 1/2] dts: make one link the default topology 2025-08-20 14:06 ` [PATCH v3 1/2] dts: make one link the default topology Dean Marx @ 2025-08-28 2:11 ` Patrick Robb 0 siblings, 0 replies; 26+ messages in thread From: Patrick Robb @ 2025-08-28 2:11 UTC (permalink / raw) To: Dean Marx Cc: luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek, dev [-- Attachment #1: Type: text/plain, Size: 880 bytes --] This looks good except that I found the commit message to be confusing. For instance, it is not true that all one link test runs will skip before this patch - they will in fact run. I do know what you mean of course but I think we should just be more clear. I just modified the commit message to the below (ran the check scripts of course) and pushed. Thank you for the patch! dts: make one link the default topology Currently the default topology for test suites when not specified is two link. However, the majority of the DPDK functions tested in DTS can be tested with a single link. It is more intuitive for a testsuite or testcase lacking a topology decorator to default to the more basic requirement of 1 link, and force tests which really do require two link to include decorators explicitly saying so. This is now applied to next-dts. [-- Attachment #2: Type: text/html, Size: 1063 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v3 2/2] dts: rewrite two link topology requirements 2025-08-20 14:06 ` [PATCH v3 0/2] dts: change default topology to one link Dean Marx 2025-08-20 14:06 ` [PATCH v3 1/2] dts: make one link the default topology Dean Marx @ 2025-08-20 14:06 ` Dean Marx 2025-08-26 14:03 ` Luca Vizzarro 2025-08-29 8:52 ` [PATCH v3 0/2] dts: change default topology to one link Luca Vizzarro 2026-03-11 16:03 ` [PATCH v6 1/2] dts: make one link the default topology Patrick Robb 3 siblings, 1 reply; 26+ messages in thread From: Dean Marx @ 2025-08-20 14:06 UTC (permalink / raw) To: probb, luca.vizzarro, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek Cc: dev, Dean Marx Some of the DTS test suites require two link topologies in order to run, but not all truly require two links for proper testing. Rewrite the topology requirements on these test suites to reflect the actual requirements. Bugzilla ID: 1755 Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- dts/tests/TestSuite_blocklist.py | 3 ++- dts/tests/TestSuite_checksum_offload.py | 3 +-- dts/tests/TestSuite_dynamic_config.py | 3 +-- dts/tests/TestSuite_port_control.py | 3 +-- dts/tests/TestSuite_uni_pkt.py | 3 +-- dts/tests/TestSuite_vlan.py | 3 +-- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blocklist.py index ce7da1cc8f..6c0507c51e 100644 --- a/dts/tests/TestSuite_blocklist.py +++ b/dts/tests/TestSuite_blocklist.py @@ -12,7 +12,6 @@ from framework.testbed_model.port import Port -@requires(topology_type=TopologyType.two_links) class TestBlocklist(TestSuite): """DPDK device blocklisting test suite.""" @@ -40,6 +39,7 @@ def no_blocklisted(self): """ self.verify_blocklisted_ports([]) + @requires(topology_type=TopologyType.two_links) @func_test def one_port_blocklisted(self): """Run testpmd with one blocklisted port. @@ -51,6 +51,7 @@ def one_port_blocklisted(self): """ self.verify_blocklisted_ports(self.topology.sut_ports[:1]) + @requires(topology_type=TopologyType.two_links) @func_test def all_but_one_port_blocklisted(self): """Run testpmd with all but one blocklisted port. diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py index d411af70a9..0487ef3ac1 100644 --- a/dts/tests/TestSuite_checksum_offload.py +++ b/dts/tests/TestSuite_checksum_offload.py @@ -26,10 +26,9 @@ TestPmdShell, ) from framework.test_suite import TestSuite, func_test -from framework.testbed_model.capability import NicCapability, TopologyType, requires +from framework.testbed_model.capability import NicCapability, requires -@requires(topology_type=TopologyType.two_links) @requires(NicCapability.RX_OFFLOAD_IPV4_CKSUM) @requires(NicCapability.RX_OFFLOAD_UDP_CKSUM) @requires(NicCapability.RX_OFFLOAD_TCP_CKSUM) diff --git a/dts/tests/TestSuite_dynamic_config.py b/dts/tests/TestSuite_dynamic_config.py index 49f295a39a..99c2b67810 100644 --- a/dts/tests/TestSuite_dynamic_config.py +++ b/dts/tests/TestSuite_dynamic_config.py @@ -22,11 +22,10 @@ from framework.params.testpmd import SimpleForwardingModes from framework.remote_session.testpmd_shell import NicCapability, TestPmdShell from framework.test_suite import TestSuite, func_test -from framework.testbed_model.capability import TopologyType, requires +from framework.testbed_model.capability import requires @requires(NicCapability.PHYSICAL_FUNCTION) -@requires(topology_type=TopologyType.two_links) class TestDynamicConfig(TestSuite): """Dynamic config suite. diff --git a/dts/tests/TestSuite_port_control.py b/dts/tests/TestSuite_port_control.py index 58783f1d18..ba06858640 100644 --- a/dts/tests/TestSuite_port_control.py +++ b/dts/tests/TestSuite_port_control.py @@ -15,11 +15,10 @@ from framework.params.testpmd import SimpleForwardingModes from framework.remote_session.testpmd_shell import NicCapability, TestPmdShell from framework.test_suite import TestSuite, func_test -from framework.testbed_model.capability import TopologyType, requires +from framework.testbed_model.capability import requires @requires(NicCapability.PHYSICAL_FUNCTION) -@requires(topology_type=TopologyType.two_links) class TestPortControl(TestSuite): """DPDK Port Control Testing Suite.""" diff --git a/dts/tests/TestSuite_uni_pkt.py b/dts/tests/TestSuite_uni_pkt.py index 690c5d4fd1..7cba5cb56b 100644 --- a/dts/tests/TestSuite_uni_pkt.py +++ b/dts/tests/TestSuite_uni_pkt.py @@ -27,10 +27,9 @@ TestPmdVerbosePacket, ) from framework.test_suite import TestSuite, func_test -from framework.testbed_model.capability import TopologyType, requires +from framework.testbed_model.capability import requires -@requires(topology_type=TopologyType.two_links) class TestUniPkt(TestSuite): """DPDK Unified packet test suite. diff --git a/dts/tests/TestSuite_vlan.py b/dts/tests/TestSuite_vlan.py index d2a9e614d4..eeeb036a1d 100644 --- a/dts/tests/TestSuite_vlan.py +++ b/dts/tests/TestSuite_vlan.py @@ -17,11 +17,10 @@ from framework.remote_session.testpmd_shell import SimpleForwardingModes, TestPmdShell from framework.test_suite import TestSuite, func_test -from framework.testbed_model.capability import NicCapability, TopologyType, requires +from framework.testbed_model.capability import NicCapability, requires @requires(NicCapability.RX_OFFLOAD_VLAN_FILTER) -@requires(topology_type=TopologyType.two_links) class TestVlan(TestSuite): """DPDK VLAN test suite. -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v3 2/2] dts: rewrite two link topology requirements 2025-08-20 14:06 ` [PATCH v3 2/2] dts: rewrite two link topology requirements Dean Marx @ 2025-08-26 14:03 ` Luca Vizzarro 2025-08-28 2:14 ` Patrick Robb 0 siblings, 1 reply; 26+ messages in thread From: Luca Vizzarro @ 2025-08-26 14:03 UTC (permalink / raw) To: Dean Marx, probb, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek; +Cc: dev Thank you! Looks good to me. Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com> ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 2/2] dts: rewrite two link topology requirements 2025-08-26 14:03 ` Luca Vizzarro @ 2025-08-28 2:14 ` Patrick Robb 0 siblings, 0 replies; 26+ messages in thread From: Patrick Robb @ 2025-08-28 2:14 UTC (permalink / raw) To: Luca Vizzarro Cc: Dean Marx, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek, dev [-- Attachment #1: Type: text/plain, Size: 44 bytes --] Thanks Dean and Luca. Applied to next-dts. [-- Attachment #2: Type: text/html, Size: 89 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v3 0/2] dts: change default topology to one link 2025-08-20 14:06 ` [PATCH v3 0/2] dts: change default topology to one link Dean Marx 2025-08-20 14:06 ` [PATCH v3 1/2] dts: make one link the default topology Dean Marx 2025-08-20 14:06 ` [PATCH v3 2/2] dts: rewrite two link topology requirements Dean Marx @ 2025-08-29 8:52 ` Luca Vizzarro 2026-03-11 16:03 ` [PATCH v6 1/2] dts: make one link the default topology Patrick Robb 3 siblings, 0 replies; 26+ messages in thread From: Luca Vizzarro @ 2025-08-29 8:52 UTC (permalink / raw) To: Dean Marx; +Cc: probb, yoan.picchi, Honnappa.Nagarahalli, paul.szczepanek, dev Hi Dean, This patch has now been rolled back due to a breaking doc building issue. This is now pending v4. Best, Luca ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v6 1/2] dts: make one link the default topology 2025-08-20 14:06 ` [PATCH v3 0/2] dts: change default topology to one link Dean Marx ` (2 preceding siblings ...) 2025-08-29 8:52 ` [PATCH v3 0/2] dts: change default topology to one link Luca Vizzarro @ 2026-03-11 16:03 ` Patrick Robb 2026-03-11 16:03 ` [PATCH v6 2/2] dts: rewrite two link topology requirements Patrick Robb 2026-03-11 16:19 ` [PATCH v6 1/2] dts: make one link the default topology Luca Vizzarro 3 siblings, 2 replies; 26+ messages in thread From: Patrick Robb @ 2026-03-11 16:03 UTC (permalink / raw) To: luca.vizzarro Cc: dev, dmarx, abailey, manjunathgouda.hosamani, Paul.Szczepanek, thomas, Patrick Robb From: Andrew Bailey <abailey@iol.unh.edu> Currently the default topology for test suites when not specified is two link. However, the majority of the DPDK functions tested in DTS can be tested with a single link. It is more intuitive for a testsuite or testcase lacking a topology decorator to default to the more basic requirement of 1 link, and force tests which really do require two link to include decorators explicitly saying so. Signed-off-by: Andrew Bailey <abailey@iol.unh.edu> Signed-off-by: Dean Marx <dmarx@iol.unh.edu> Reviewed-by: Patrick Robb <probb@iol.unh.edu> --- dts/api/capabilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/api/capabilities.py b/dts/api/capabilities.py index 2d0cd65854..09bc538523 100644 --- a/dts/api/capabilities.py +++ b/dts/api/capabilities.py @@ -63,7 +63,7 @@ class LinkTopology(IntEnum): @classmethod def default(cls) -> "LinkTopology": """The default topology required by test cases if not specified otherwise.""" - return cls.TWO_LINKS + return cls.ONE_LINK class NicCapability(IntEnum): -- 2.49.0 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v6 2/2] dts: rewrite two link topology requirements 2026-03-11 16:03 ` [PATCH v6 1/2] dts: make one link the default topology Patrick Robb @ 2026-03-11 16:03 ` Patrick Robb 2026-03-11 16:05 ` Patrick Robb 2026-03-11 16:19 ` Luca Vizzarro 2026-03-11 16:19 ` [PATCH v6 1/2] dts: make one link the default topology Luca Vizzarro 1 sibling, 2 replies; 26+ messages in thread From: Patrick Robb @ 2026-03-11 16:03 UTC (permalink / raw) To: luca.vizzarro Cc: dev, dmarx, abailey, manjunathgouda.hosamani, Paul.Szczepanek, thomas, Patrick Robb From: Andrew Bailey <abailey@iol.unh.edu> Some of the DTS test suites require two link topologies in order to run, but not all truly require two links for proper testing. Rewrite the topology requirements on these test suites to reflect the actual requirements. Signed-off-by: Andrew Bailey <abailey@iol.unh.edu> Signed-off-by: Dean Marx <dmarx@iol.unh.edu> Reviewed-by: Patrick Robb <probb@iol.unh.edu> --- dts/framework/test_suite.py | 8 ++++---- dts/tests/TestSuite_blocklist.py | 3 ++- dts/tests/TestSuite_checksum_offload.py | 3 --- dts/tests/TestSuite_dual_vlan.py | 2 ++ dts/tests/TestSuite_port_control.py | 3 --- dts/tests/TestSuite_uni_pkt.py | 3 --- dts/tests/TestSuite_vlan.py | 2 +- 7 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py index e86096cefe..69ce26040a 100644 --- a/dts/framework/test_suite.py +++ b/dts/framework/test_suite.py @@ -23,7 +23,7 @@ from ipaddress import IPv4Interface, IPv6Interface, ip_interface from pkgutil import iter_modules from types import ModuleType -from typing import TYPE_CHECKING, ClassVar, Protocol, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, ClassVar, Protocol, TypeVar, Union, cast from scapy.layers.inet import IP from scapy.packet import Packet @@ -332,11 +332,11 @@ def _decorator(func: TestSuiteMethodType) -> type[TestCase]: #: The decorator for functional test cases. -func_test: Callable = TestCase.make_decorator(TestCaseType.FUNCTIONAL) +func_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.FUNCTIONAL) #: The decorator for performance test cases. -perf_test: Callable = TestCase.make_decorator(TestCaseType.PERFORMANCE) +perf_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.PERFORMANCE) #: The decorator for cryptography test cases. -crypto_test: Callable = TestCase.make_decorator(TestCaseType.CRYPTO) +crypto_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.CRYPTO) @dataclass diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blocklist.py index ba37f39ab3..c57231de22 100644 --- a/dts/tests/TestSuite_blocklist.py +++ b/dts/tests/TestSuite_blocklist.py @@ -16,7 +16,6 @@ from framework.testbed_model.port import Port -@requires_link_topology(LinkTopology.TWO_LINKS) class TestBlocklist(TestSuite): """DPDK device blocklisting test suite.""" @@ -45,6 +44,7 @@ def no_blocklisted(self) -> None: """ self._verify_blocklisted_ports([]) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def one_port_blocklisted(self) -> None: """Run testpmd with one blocklisted port. @@ -57,6 +57,7 @@ def one_port_blocklisted(self) -> None: """ self._verify_blocklisted_ports(self.topology.sut_ports[:1]) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def all_but_one_port_blocklisted(self) -> None: """Run testpmd with all but one blocklisted port. diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py index 394a73c31d..90ca798e56 100644 --- a/dts/tests/TestSuite_checksum_offload.py +++ b/dts/tests/TestSuite_checksum_offload.py @@ -20,9 +20,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -33,7 +31,6 @@ from framework.test_suite import TestSuite, func_test -@requires_link_topology(LinkTopology.TWO_LINKS) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_IPV4_CKSUM) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_UDP_CKSUM) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_TCP_CKSUM) diff --git a/dts/tests/TestSuite_dual_vlan.py b/dts/tests/TestSuite_dual_vlan.py index 860eae7424..1b77dd2b47 100644 --- a/dts/tests/TestSuite_dual_vlan.py +++ b/dts/tests/TestSuite_dual_vlan.py @@ -18,6 +18,7 @@ from scapy.layers.l2 import Dot1Q, Ether from scapy.packet import Packet, Raw +from api.capabilities import LinkTopology, requires_link_topology from api.packet import send_packet_and_capture from api.test import verify from api.testpmd import TestPmd @@ -161,6 +162,7 @@ def _configure_testpmd(self, shell: TestPmd, options: TestCaseOptions, add: bool if self.TestCaseOptions.VLAN_STRIP in options: shell.set_vlan_strip(self.rx_port, add) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def insert_second_vlan(self) -> None: """Test that a packet with a single VLAN can have an additional one inserted into it. diff --git a/dts/tests/TestSuite_port_control.py b/dts/tests/TestSuite_port_control.py index d9cc5ff4c9..6be47838d0 100644 --- a/dts/tests/TestSuite_port_control.py +++ b/dts/tests/TestSuite_port_control.py @@ -13,9 +13,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packets_and_capture @@ -26,7 +24,6 @@ @requires_nic_capability(NicCapability.PHYSICAL_FUNCTION) -@requires_link_topology(LinkTopology.TWO_LINKS) class TestPortControl(TestSuite): """DPDK Port Control Testing Suite.""" diff --git a/dts/tests/TestSuite_uni_pkt.py b/dts/tests/TestSuite_uni_pkt.py index 97d61cd03a..222276ce67 100644 --- a/dts/tests/TestSuite_uni_pkt.py +++ b/dts/tests/TestSuite_uni_pkt.py @@ -20,9 +20,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -33,7 +31,6 @@ from framework.test_suite import TestSuite, func_test -@requires_link_topology(LinkTopology.TWO_LINKS) class TestUniPkt(TestSuite): """DPDK Unified packet test suite. diff --git a/dts/tests/TestSuite_vlan.py b/dts/tests/TestSuite_vlan.py index 2c5abd68bf..898673fc86 100644 --- a/dts/tests/TestSuite_vlan.py +++ b/dts/tests/TestSuite_vlan.py @@ -29,7 +29,6 @@ @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_VLAN_FILTER) -@requires_link_topology(LinkTopology.TWO_LINKS) class TestVlan(TestSuite): """DPDK VLAN test suite. @@ -178,6 +177,7 @@ def vlan_no_receipt(self) -> None: testpmd.start() self._send_vlan_packet_and_verify(should_receive=False, strip=False, vlan_id=2) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def vlan_header_insertion(self) -> None: """Ensure that VLAN packet is received with the correct inserted VLAN tag. -- 2.49.0 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v6 2/2] dts: rewrite two link topology requirements 2026-03-11 16:03 ` [PATCH v6 2/2] dts: rewrite two link topology requirements Patrick Robb @ 2026-03-11 16:05 ` Patrick Robb 2026-03-11 16:19 ` Luca Vizzarro 1 sibling, 0 replies; 26+ messages in thread From: Patrick Robb @ 2026-03-11 16:05 UTC (permalink / raw) To: luca.vizzarro Cc: dev, dmarx, abailey, manjunathgouda.hosamani, Paul.Szczepanek, thomas This is the final version of this series. I ran Andrew's v5 across all of the testcases in DTS and discovered 2 testcases which require the two link topology because they have hardcoded steps involving port 1. During the next release Dean or Andrew will update these so that they are actually tolerant to a single link DTS setup, but for now I'm just decorating them according to the code as it exists. Provided that this passes the CI checks I will merge to next-dts. On Wed, Mar 11, 2026 at 12:06 PM Patrick Robb <probb@iol.unh.edu> wrote: > > From: Andrew Bailey <abailey@iol.unh.edu> > > Some of the DTS test suites require two link topologies > in order to run, but not all truly require two links > for proper testing. Rewrite the topology requirements > on these test suites to reflect the actual > requirements. > > Signed-off-by: Andrew Bailey <abailey@iol.unh.edu> > Signed-off-by: Dean Marx <dmarx@iol.unh.edu> > Reviewed-by: Patrick Robb <probb@iol.unh.edu> > --- > dts/framework/test_suite.py | 8 ++++---- > dts/tests/TestSuite_blocklist.py | 3 ++- > dts/tests/TestSuite_checksum_offload.py | 3 --- > dts/tests/TestSuite_dual_vlan.py | 2 ++ > dts/tests/TestSuite_port_control.py | 3 --- > dts/tests/TestSuite_uni_pkt.py | 3 --- > dts/tests/TestSuite_vlan.py | 2 +- > 7 files changed, 9 insertions(+), 15 deletions(-) > > diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py > index e86096cefe..69ce26040a 100644 > --- a/dts/framework/test_suite.py > +++ b/dts/framework/test_suite.py > @@ -23,7 +23,7 @@ > from ipaddress import IPv4Interface, IPv6Interface, ip_interface > from pkgutil import iter_modules > from types import ModuleType > -from typing import TYPE_CHECKING, ClassVar, Protocol, TypeVar, Union, cast > +from typing import TYPE_CHECKING, Any, ClassVar, Protocol, TypeVar, Union, cast > > from scapy.layers.inet import IP > from scapy.packet import Packet > @@ -332,11 +332,11 @@ def _decorator(func: TestSuiteMethodType) -> type[TestCase]: > > > #: The decorator for functional test cases. > -func_test: Callable = TestCase.make_decorator(TestCaseType.FUNCTIONAL) > +func_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.FUNCTIONAL) > #: The decorator for performance test cases. > -perf_test: Callable = TestCase.make_decorator(TestCaseType.PERFORMANCE) > +perf_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.PERFORMANCE) > #: The decorator for cryptography test cases. > -crypto_test: Callable = TestCase.make_decorator(TestCaseType.CRYPTO) > +crypto_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.CRYPTO) > > > @dataclass > diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blocklist.py > index ba37f39ab3..c57231de22 100644 > --- a/dts/tests/TestSuite_blocklist.py > +++ b/dts/tests/TestSuite_blocklist.py > @@ -16,7 +16,6 @@ > from framework.testbed_model.port import Port > > > -@requires_link_topology(LinkTopology.TWO_LINKS) > class TestBlocklist(TestSuite): > """DPDK device blocklisting test suite.""" > > @@ -45,6 +44,7 @@ def no_blocklisted(self) -> None: > """ > self._verify_blocklisted_ports([]) > > + @requires_link_topology(LinkTopology.TWO_LINKS) > @func_test > def one_port_blocklisted(self) -> None: > """Run testpmd with one blocklisted port. > @@ -57,6 +57,7 @@ def one_port_blocklisted(self) -> None: > """ > self._verify_blocklisted_ports(self.topology.sut_ports[:1]) > > + @requires_link_topology(LinkTopology.TWO_LINKS) > @func_test > def all_but_one_port_blocklisted(self) -> None: > """Run testpmd with all but one blocklisted port. > diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py > index 394a73c31d..90ca798e56 100644 > --- a/dts/tests/TestSuite_checksum_offload.py > +++ b/dts/tests/TestSuite_checksum_offload.py > @@ -20,9 +20,7 @@ > from scapy.packet import Packet, Raw > > from api.capabilities import ( > - LinkTopology, > NicCapability, > - requires_link_topology, > requires_nic_capability, > ) > from api.packet import send_packet_and_capture > @@ -33,7 +31,6 @@ > from framework.test_suite import TestSuite, func_test > > > -@requires_link_topology(LinkTopology.TWO_LINKS) > @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_IPV4_CKSUM) > @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_UDP_CKSUM) > @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_TCP_CKSUM) > diff --git a/dts/tests/TestSuite_dual_vlan.py b/dts/tests/TestSuite_dual_vlan.py > index 860eae7424..1b77dd2b47 100644 > --- a/dts/tests/TestSuite_dual_vlan.py > +++ b/dts/tests/TestSuite_dual_vlan.py > @@ -18,6 +18,7 @@ > from scapy.layers.l2 import Dot1Q, Ether > from scapy.packet import Packet, Raw > > +from api.capabilities import LinkTopology, requires_link_topology > from api.packet import send_packet_and_capture > from api.test import verify > from api.testpmd import TestPmd > @@ -161,6 +162,7 @@ def _configure_testpmd(self, shell: TestPmd, options: TestCaseOptions, add: bool > if self.TestCaseOptions.VLAN_STRIP in options: > shell.set_vlan_strip(self.rx_port, add) > > + @requires_link_topology(LinkTopology.TWO_LINKS) > @func_test > def insert_second_vlan(self) -> None: > """Test that a packet with a single VLAN can have an additional one inserted into it. > diff --git a/dts/tests/TestSuite_port_control.py b/dts/tests/TestSuite_port_control.py > index d9cc5ff4c9..6be47838d0 100644 > --- a/dts/tests/TestSuite_port_control.py > +++ b/dts/tests/TestSuite_port_control.py > @@ -13,9 +13,7 @@ > from scapy.packet import Packet, Raw > > from api.capabilities import ( > - LinkTopology, > NicCapability, > - requires_link_topology, > requires_nic_capability, > ) > from api.packet import send_packets_and_capture > @@ -26,7 +24,6 @@ > > > @requires_nic_capability(NicCapability.PHYSICAL_FUNCTION) > -@requires_link_topology(LinkTopology.TWO_LINKS) > class TestPortControl(TestSuite): > """DPDK Port Control Testing Suite.""" > > diff --git a/dts/tests/TestSuite_uni_pkt.py b/dts/tests/TestSuite_uni_pkt.py > index 97d61cd03a..222276ce67 100644 > --- a/dts/tests/TestSuite_uni_pkt.py > +++ b/dts/tests/TestSuite_uni_pkt.py > @@ -20,9 +20,7 @@ > from scapy.packet import Packet, Raw > > from api.capabilities import ( > - LinkTopology, > NicCapability, > - requires_link_topology, > requires_nic_capability, > ) > from api.packet import send_packet_and_capture > @@ -33,7 +31,6 @@ > from framework.test_suite import TestSuite, func_test > > > -@requires_link_topology(LinkTopology.TWO_LINKS) > class TestUniPkt(TestSuite): > """DPDK Unified packet test suite. > > diff --git a/dts/tests/TestSuite_vlan.py b/dts/tests/TestSuite_vlan.py > index 2c5abd68bf..898673fc86 100644 > --- a/dts/tests/TestSuite_vlan.py > +++ b/dts/tests/TestSuite_vlan.py > @@ -29,7 +29,6 @@ > > > @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_VLAN_FILTER) > -@requires_link_topology(LinkTopology.TWO_LINKS) > class TestVlan(TestSuite): > """DPDK VLAN test suite. > > @@ -178,6 +177,7 @@ def vlan_no_receipt(self) -> None: > testpmd.start() > self._send_vlan_packet_and_verify(should_receive=False, strip=False, vlan_id=2) > > + @requires_link_topology(LinkTopology.TWO_LINKS) > @func_test > def vlan_header_insertion(self) -> None: > """Ensure that VLAN packet is received with the correct inserted VLAN tag. > -- > 2.49.0 > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v6 2/2] dts: rewrite two link topology requirements 2026-03-11 16:03 ` [PATCH v6 2/2] dts: rewrite two link topology requirements Patrick Robb 2026-03-11 16:05 ` Patrick Robb @ 2026-03-11 16:19 ` Luca Vizzarro 1 sibling, 0 replies; 26+ messages in thread From: Luca Vizzarro @ 2026-03-11 16:19 UTC (permalink / raw) To: Patrick Robb Cc: dev, dmarx, abailey, manjunathgouda.hosamani, Paul.Szczepanek, thomas Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com> ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v6 1/2] dts: make one link the default topology 2026-03-11 16:03 ` [PATCH v6 1/2] dts: make one link the default topology Patrick Robb 2026-03-11 16:03 ` [PATCH v6 2/2] dts: rewrite two link topology requirements Patrick Robb @ 2026-03-11 16:19 ` Luca Vizzarro 1 sibling, 0 replies; 26+ messages in thread From: Luca Vizzarro @ 2026-03-11 16:19 UTC (permalink / raw) To: Patrick Robb Cc: dev, dmarx, abailey, manjunathgouda.hosamani, Paul.Szczepanek, thomas Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com> ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v4 1/2] dts: make one link the default topology 2025-07-23 13:50 [PATCH v1] dts: make one link the default topology Dean Marx 2025-07-28 12:15 ` Luca Vizzarro 2025-08-07 14:07 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Dean Marx @ 2025-11-21 19:55 ` Andrew Bailey 2025-11-21 19:55 ` [PATCH v4 2/2] dts: rewrite two link topology requirements Andrew Bailey 2025-12-17 16:57 ` [PATCH v5 1/2] dts: make one link the default topology Andrew Bailey 2 siblings, 2 replies; 26+ messages in thread From: Andrew Bailey @ 2025-11-21 19:55 UTC (permalink / raw) To: probb; +Cc: luca.vizzarro, dmarx, dev, Andrew Bailey Currently the default topology for test suites when not specified is two link. However, the majority of the DPDK functions tested in DTS can be tested with a single link. It is more intuitive for a testsuite or testcase lacking a topology decorator to default to the more basic requirement of 1 link, and force tests which really do require two link to include decorators explicitly saying so. Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- dts/api/capabilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/api/capabilities.py b/dts/api/capabilities.py index 243759668f..eafbd38afa 100644 --- a/dts/api/capabilities.py +++ b/dts/api/capabilities.py @@ -63,7 +63,7 @@ class LinkTopology(IntEnum): @classmethod def default(cls) -> "LinkTopology": """The default topology required by test cases if not specified otherwise.""" - return cls.TWO_LINKS + return cls.NO_LINK class NicCapability(IntEnum): -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v4 2/2] dts: rewrite two link topology requirements 2025-11-21 19:55 ` [PATCH v4 " Andrew Bailey @ 2025-11-21 19:55 ` Andrew Bailey 2025-12-17 16:57 ` [PATCH v5 1/2] dts: make one link the default topology Andrew Bailey 1 sibling, 0 replies; 26+ messages in thread From: Andrew Bailey @ 2025-11-21 19:55 UTC (permalink / raw) To: probb; +Cc: luca.vizzarro, dmarx, dev, Andrew Bailey Some of the DTS test suites require two link topologies in order to run, but not all truly require two links for proper testing. Rewrite the topology requirements on these test suites to reflect the actual requirements. Signed-off-by: Andrew Bailey <abailey@iol.unh.edu> Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- dts/framework/test_suite.py | 6 +++--- dts/tests/TestSuite_blocklist.py | 3 ++- dts/tests/TestSuite_checksum_offload.py | 3 --- dts/tests/TestSuite_port_control.py | 3 --- dts/tests/TestSuite_uni_pkt.py | 3 --- dts/tests/TestSuite_vlan.py | 3 --- 6 files changed, 5 insertions(+), 16 deletions(-) diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py index 9c57e343ac..48e0366b61 100644 --- a/dts/framework/test_suite.py +++ b/dts/framework/test_suite.py @@ -23,7 +23,7 @@ from ipaddress import IPv4Interface, IPv6Interface, ip_interface from pkgutil import iter_modules from types import ModuleType -from typing import TYPE_CHECKING, ClassVar, Protocol, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, ClassVar, Protocol, TypeVar, Union, cast from scapy.layers.inet import IP from scapy.packet import Packet @@ -328,9 +328,9 @@ def _decorator(func: TestSuiteMethodType) -> type[TestCase]: #: The decorator for functional test cases. -func_test: Callable = TestCase.make_decorator(TestCaseType.FUNCTIONAL) +func_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.FUNCTIONAL) #: The decorator for performance test cases. -perf_test: Callable = TestCase.make_decorator(TestCaseType.PERFORMANCE) +perf_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.PERFORMANCE) @dataclass diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blocklist.py index ba37f39ab3..c57231de22 100644 --- a/dts/tests/TestSuite_blocklist.py +++ b/dts/tests/TestSuite_blocklist.py @@ -16,7 +16,6 @@ from framework.testbed_model.port import Port -@requires_link_topology(LinkTopology.TWO_LINKS) class TestBlocklist(TestSuite): """DPDK device blocklisting test suite.""" @@ -45,6 +44,7 @@ def no_blocklisted(self) -> None: """ self._verify_blocklisted_ports([]) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def one_port_blocklisted(self) -> None: """Run testpmd with one blocklisted port. @@ -57,6 +57,7 @@ def one_port_blocklisted(self) -> None: """ self._verify_blocklisted_ports(self.topology.sut_ports[:1]) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def all_but_one_port_blocklisted(self) -> None: """Run testpmd with all but one blocklisted port. diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py index 394a73c31d..90ca798e56 100644 --- a/dts/tests/TestSuite_checksum_offload.py +++ b/dts/tests/TestSuite_checksum_offload.py @@ -20,9 +20,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -33,7 +31,6 @@ from framework.test_suite import TestSuite, func_test -@requires_link_topology(LinkTopology.TWO_LINKS) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_IPV4_CKSUM) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_UDP_CKSUM) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_TCP_CKSUM) diff --git a/dts/tests/TestSuite_port_control.py b/dts/tests/TestSuite_port_control.py index d9cc5ff4c9..6be47838d0 100644 --- a/dts/tests/TestSuite_port_control.py +++ b/dts/tests/TestSuite_port_control.py @@ -13,9 +13,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packets_and_capture @@ -26,7 +24,6 @@ @requires_nic_capability(NicCapability.PHYSICAL_FUNCTION) -@requires_link_topology(LinkTopology.TWO_LINKS) class TestPortControl(TestSuite): """DPDK Port Control Testing Suite.""" diff --git a/dts/tests/TestSuite_uni_pkt.py b/dts/tests/TestSuite_uni_pkt.py index 97d61cd03a..222276ce67 100644 --- a/dts/tests/TestSuite_uni_pkt.py +++ b/dts/tests/TestSuite_uni_pkt.py @@ -20,9 +20,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -33,7 +31,6 @@ from framework.test_suite import TestSuite, func_test -@requires_link_topology(LinkTopology.TWO_LINKS) class TestUniPkt(TestSuite): """DPDK Unified packet test suite. diff --git a/dts/tests/TestSuite_vlan.py b/dts/tests/TestSuite_vlan.py index 2c5abd68bf..1b5f8d0b12 100644 --- a/dts/tests/TestSuite_vlan.py +++ b/dts/tests/TestSuite_vlan.py @@ -16,9 +16,7 @@ from scapy.packet import Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -29,7 +27,6 @@ @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_VLAN_FILTER) -@requires_link_topology(LinkTopology.TWO_LINKS) class TestVlan(TestSuite): """DPDK VLAN test suite. -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v5 1/2] dts: make one link the default topology 2025-11-21 19:55 ` [PATCH v4 " Andrew Bailey 2025-11-21 19:55 ` [PATCH v4 2/2] dts: rewrite two link topology requirements Andrew Bailey @ 2025-12-17 16:57 ` Andrew Bailey 2025-12-17 16:57 ` [PATCH v5 2/2] dts: rewrite two link topology requirements Andrew Bailey 2026-03-10 14:53 ` [PATCH v5 1/2] dts: make one link the default topology Patrick Robb 1 sibling, 2 replies; 26+ messages in thread From: Andrew Bailey @ 2025-12-17 16:57 UTC (permalink / raw) To: probb; +Cc: luca.vizzarro, dmarx, dev, Andrew Bailey Currently the default topology for test suites when not specified is two link. However, the majority of the DPDK functions tested in DTS can be tested with a single link. It is more intuitive for a testsuite or testcase lacking a topology decorator to default to the more basic requirement of 1 link, and force tests which really do require two link to include decorators explicitly saying so. Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- dts/api/capabilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/api/capabilities.py b/dts/api/capabilities.py index 243759668f..801eb0c9a2 100644 --- a/dts/api/capabilities.py +++ b/dts/api/capabilities.py @@ -63,7 +63,7 @@ class LinkTopology(IntEnum): @classmethod def default(cls) -> "LinkTopology": """The default topology required by test cases if not specified otherwise.""" - return cls.TWO_LINKS + return cls.ONE_LINK class NicCapability(IntEnum): -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v5 2/2] dts: rewrite two link topology requirements 2025-12-17 16:57 ` [PATCH v5 1/2] dts: make one link the default topology Andrew Bailey @ 2025-12-17 16:57 ` Andrew Bailey 2026-03-10 14:53 ` [PATCH v5 1/2] dts: make one link the default topology Patrick Robb 1 sibling, 0 replies; 26+ messages in thread From: Andrew Bailey @ 2025-12-17 16:57 UTC (permalink / raw) To: probb; +Cc: luca.vizzarro, dmarx, dev, Andrew Bailey Some of the DTS test suites require two link topologies in order to run, but not all truly require two links for proper testing. Rewrite the topology requirements on these test suites to reflect the actual requirements. Signed-off-by: Andrew Bailey <abailey@iol.unh.edu> Signed-off-by: Dean Marx <dmarx@iol.unh.edu> --- dts/framework/test_suite.py | 6 +++--- dts/tests/TestSuite_blocklist.py | 3 ++- dts/tests/TestSuite_checksum_offload.py | 3 --- dts/tests/TestSuite_port_control.py | 3 --- dts/tests/TestSuite_uni_pkt.py | 3 --- dts/tests/TestSuite_vlan.py | 3 --- 6 files changed, 5 insertions(+), 16 deletions(-) diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py index 9c57e343ac..48e0366b61 100644 --- a/dts/framework/test_suite.py +++ b/dts/framework/test_suite.py @@ -23,7 +23,7 @@ from ipaddress import IPv4Interface, IPv6Interface, ip_interface from pkgutil import iter_modules from types import ModuleType -from typing import TYPE_CHECKING, ClassVar, Protocol, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, ClassVar, Protocol, TypeVar, Union, cast from scapy.layers.inet import IP from scapy.packet import Packet @@ -328,9 +328,9 @@ def _decorator(func: TestSuiteMethodType) -> type[TestCase]: #: The decorator for functional test cases. -func_test: Callable = TestCase.make_decorator(TestCaseType.FUNCTIONAL) +func_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.FUNCTIONAL) #: The decorator for performance test cases. -perf_test: Callable = TestCase.make_decorator(TestCaseType.PERFORMANCE) +perf_test: Callable[[Any], type["TestCase"]] = TestCase.make_decorator(TestCaseType.PERFORMANCE) @dataclass diff --git a/dts/tests/TestSuite_blocklist.py b/dts/tests/TestSuite_blocklist.py index ba37f39ab3..c57231de22 100644 --- a/dts/tests/TestSuite_blocklist.py +++ b/dts/tests/TestSuite_blocklist.py @@ -16,7 +16,6 @@ from framework.testbed_model.port import Port -@requires_link_topology(LinkTopology.TWO_LINKS) class TestBlocklist(TestSuite): """DPDK device blocklisting test suite.""" @@ -45,6 +44,7 @@ def no_blocklisted(self) -> None: """ self._verify_blocklisted_ports([]) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def one_port_blocklisted(self) -> None: """Run testpmd with one blocklisted port. @@ -57,6 +57,7 @@ def one_port_blocklisted(self) -> None: """ self._verify_blocklisted_ports(self.topology.sut_ports[:1]) + @requires_link_topology(LinkTopology.TWO_LINKS) @func_test def all_but_one_port_blocklisted(self) -> None: """Run testpmd with all but one blocklisted port. diff --git a/dts/tests/TestSuite_checksum_offload.py b/dts/tests/TestSuite_checksum_offload.py index 394a73c31d..90ca798e56 100644 --- a/dts/tests/TestSuite_checksum_offload.py +++ b/dts/tests/TestSuite_checksum_offload.py @@ -20,9 +20,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -33,7 +31,6 @@ from framework.test_suite import TestSuite, func_test -@requires_link_topology(LinkTopology.TWO_LINKS) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_IPV4_CKSUM) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_UDP_CKSUM) @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_TCP_CKSUM) diff --git a/dts/tests/TestSuite_port_control.py b/dts/tests/TestSuite_port_control.py index d9cc5ff4c9..6be47838d0 100644 --- a/dts/tests/TestSuite_port_control.py +++ b/dts/tests/TestSuite_port_control.py @@ -13,9 +13,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packets_and_capture @@ -26,7 +24,6 @@ @requires_nic_capability(NicCapability.PHYSICAL_FUNCTION) -@requires_link_topology(LinkTopology.TWO_LINKS) class TestPortControl(TestSuite): """DPDK Port Control Testing Suite.""" diff --git a/dts/tests/TestSuite_uni_pkt.py b/dts/tests/TestSuite_uni_pkt.py index 97d61cd03a..222276ce67 100644 --- a/dts/tests/TestSuite_uni_pkt.py +++ b/dts/tests/TestSuite_uni_pkt.py @@ -20,9 +20,7 @@ from scapy.packet import Packet, Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -33,7 +31,6 @@ from framework.test_suite import TestSuite, func_test -@requires_link_topology(LinkTopology.TWO_LINKS) class TestUniPkt(TestSuite): """DPDK Unified packet test suite. diff --git a/dts/tests/TestSuite_vlan.py b/dts/tests/TestSuite_vlan.py index 2c5abd68bf..1b5f8d0b12 100644 --- a/dts/tests/TestSuite_vlan.py +++ b/dts/tests/TestSuite_vlan.py @@ -16,9 +16,7 @@ from scapy.packet import Raw from api.capabilities import ( - LinkTopology, NicCapability, - requires_link_topology, requires_nic_capability, ) from api.packet import send_packet_and_capture @@ -29,7 +27,6 @@ @requires_nic_capability(NicCapability.PORT_RX_OFFLOAD_VLAN_FILTER) -@requires_link_topology(LinkTopology.TWO_LINKS) class TestVlan(TestSuite): """DPDK VLAN test suite. -- 2.50.1 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH v5 1/2] dts: make one link the default topology 2025-12-17 16:57 ` [PATCH v5 1/2] dts: make one link the default topology Andrew Bailey 2025-12-17 16:57 ` [PATCH v5 2/2] dts: rewrite two link topology requirements Andrew Bailey @ 2026-03-10 14:53 ` Patrick Robb 2026-03-10 15:06 ` Patrick Robb 1 sibling, 1 reply; 26+ messages in thread From: Patrick Robb @ 2026-03-10 14:53 UTC (permalink / raw) To: Andrew Bailey; +Cc: luca.vizzarro, dmarx, dev The implementation of the patch looks good to me, but I think the testsuites being reduced from 2 links to 1 link might be an incorrect set. For instance, I just did a testrun on cx7 comparing for-main to for-main + this series. This series introduces failures for: port control: start_ports testcase vlan: vlan_no_receipt testcase vlan: vlan_receipt_stripping testcase In terms of why these fails are happening... in principle the functions flexed by these testcases should be fine to test with 1 link. My guess is we are uncovering an issue with the scapy sniffer when running a 1 link test. The port_control testcase fails because it expects 100 packets and sniffs 200. Perhaps this is because it is sniffing both tx and rx packets on the TG port 0. We have code to prevent this from the most recent implementation of the sniffer class but maybe it has a gap. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v5 1/2] dts: make one link the default topology 2026-03-10 14:53 ` [PATCH v5 1/2] dts: make one link the default topology Patrick Robb @ 2026-03-10 15:06 ` Patrick Robb 2026-03-10 15:08 ` Patrick Robb 0 siblings, 1 reply; 26+ messages in thread From: Patrick Robb @ 2026-03-10 15:06 UTC (permalink / raw) To: Andrew Bailey; +Cc: dmarx, dev, Luca Vizzarro One more issue (that is probably not sniffer related) is that when changing to 1 link, vlan_header_insertion testcase has an ERROR result with: "Testpmd failed to set vlan insertion tag 51 on port 1." This makes sense because usage of port 1 is hardcoded into the testcast - we need to decorate this wil requires 2 links. @func_test def vlan_header_insertion(self) -> None: """Ensure that VLAN packet is received with the correct inserted VLAN tag. Steps: * Start testpmd. * Set forwarding mode to MAC. * Disable promiscuous mode. * Enable Tx VLAN and set the VLAN tag. * Send and capture VLAN packets. Verify: * VLAN packets are received with the correct inserted VLAN tag. """ with TestPmd() as testpmd: testpmd.set_forward_mode(SimpleForwardingModes.mac) testpmd.set_promisc(port=0, enable=False) testpmd.stop_all_ports() testpmd.tx_vlan_set(port=1, enable=True, vlan=51) testpmd.start_all_ports() testpmd.start() self._send_packet_and_verify_insertion(expected_id=51) On Tue, Mar 10, 2026 at 10:53 AM Patrick Robb <probb@iol.unh.edu> wrote: > > The implementation of the patch looks good to me, but I think the > testsuites being reduced from 2 links to 1 link might be an incorrect > set. > > For instance, I just did a testrun on cx7 comparing for-main to > for-main + this series. > > This series introduces failures for: > port control: start_ports testcase > vlan: vlan_no_receipt testcase > vlan: vlan_receipt_stripping testcase > > In terms of why these fails are happening... in principle the > functions flexed by these testcases should be fine to test with 1 > link. My guess is we are uncovering an issue with the scapy sniffer > when running a 1 link test. The port_control testcase fails because it > expects 100 packets and sniffs 200. Perhaps this is because it is > sniffing both tx and rx packets on the TG port 0. We have code to > prevent this from the most recent implementation of the sniffer class > but maybe it has a gap. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v5 1/2] dts: make one link the default topology 2026-03-10 15:06 ` Patrick Robb @ 2026-03-10 15:08 ` Patrick Robb 0 siblings, 0 replies; 26+ messages in thread From: Patrick Robb @ 2026-03-10 15:08 UTC (permalink / raw) To: Andrew Bailey; +Cc: dmarx, dev, Luca Vizzarro Pardon me, I should have said it's "definitely" not sniffer related - of course the issue is trying to set a port setting in testpmd for a port that doesn't exist. So again let's decorate this testcase with 2 link OR rewrite it so that when topology has 1 link, the tx port setting is set on port 0, not port 1. On Tue, Mar 10, 2026 at 11:06 AM Patrick Robb <probb@iol.unh.edu> wrote: > > One more issue (that is probably not sniffer related) is that when > changing to 1 link, vlan_header_insertion testcase has an ERROR result > with: "Testpmd failed to set vlan insertion tag 51 on port 1." This > makes sense because usage of port 1 is hardcoded into the testcast - > we need to decorate this wil requires 2 links. > > @func_test > def vlan_header_insertion(self) -> None: > """Ensure that VLAN packet is received with the correct > inserted VLAN tag. > > Steps: > * Start testpmd. > * Set forwarding mode to MAC. > * Disable promiscuous mode. > * Enable Tx VLAN and set the VLAN tag. > * Send and capture VLAN packets. > > Verify: > * VLAN packets are received with the correct inserted VLAN tag. > """ > with TestPmd() as testpmd: > testpmd.set_forward_mode(SimpleForwardingModes.mac) > testpmd.set_promisc(port=0, enable=False) > testpmd.stop_all_ports() > testpmd.tx_vlan_set(port=1, enable=True, vlan=51) > testpmd.start_all_ports() > testpmd.start() > self._send_packet_and_verify_insertion(expected_id=51) > > On Tue, Mar 10, 2026 at 10:53 AM Patrick Robb <probb@iol.unh.edu> wrote: > > > > The implementation of the patch looks good to me, but I think the > > testsuites being reduced from 2 links to 1 link might be an incorrect > > set. > > > > For instance, I just did a testrun on cx7 comparing for-main to > > for-main + this series. > > > > This series introduces failures for: > > port control: start_ports testcase > > vlan: vlan_no_receipt testcase > > vlan: vlan_receipt_stripping testcase > > > > In terms of why these fails are happening... in principle the > > functions flexed by these testcases should be fine to test with 1 > > link. My guess is we are uncovering an issue with the scapy sniffer > > when running a 1 link test. The port_control testcase fails because it > > expects 100 packets and sniffs 200. Perhaps this is because it is > > sniffing both tx and rx packets on the TG port 0. We have code to > > prevent this from the most recent implementation of the sniffer class > > but maybe it has a gap. ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2026-03-11 16:19 UTC | newest] Thread overview: 26+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-07-23 13:50 [PATCH v1] dts: make one link the default topology Dean Marx 2025-07-28 12:15 ` Luca Vizzarro 2025-08-07 14:07 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Dean Marx 2025-08-07 14:07 ` [PATCH v2 2/2] dts: make one link the default topology Dean Marx 2025-08-11 10:47 ` Luca Vizzarro 2025-08-11 10:47 ` [PATCH v2 1/2] dts: rewrite two link topology requirements Luca Vizzarro 2025-08-11 10:50 ` Luca Vizzarro 2025-08-20 14:06 ` [PATCH v3 0/2] dts: change default topology to one link Dean Marx 2025-08-20 14:06 ` [PATCH v3 1/2] dts: make one link the default topology Dean Marx 2025-08-28 2:11 ` Patrick Robb 2025-08-20 14:06 ` [PATCH v3 2/2] dts: rewrite two link topology requirements Dean Marx 2025-08-26 14:03 ` Luca Vizzarro 2025-08-28 2:14 ` Patrick Robb 2025-08-29 8:52 ` [PATCH v3 0/2] dts: change default topology to one link Luca Vizzarro 2026-03-11 16:03 ` [PATCH v6 1/2] dts: make one link the default topology Patrick Robb 2026-03-11 16:03 ` [PATCH v6 2/2] dts: rewrite two link topology requirements Patrick Robb 2026-03-11 16:05 ` Patrick Robb 2026-03-11 16:19 ` Luca Vizzarro 2026-03-11 16:19 ` [PATCH v6 1/2] dts: make one link the default topology Luca Vizzarro 2025-11-21 19:55 ` [PATCH v4 " Andrew Bailey 2025-11-21 19:55 ` [PATCH v4 2/2] dts: rewrite two link topology requirements Andrew Bailey 2025-12-17 16:57 ` [PATCH v5 1/2] dts: make one link the default topology Andrew Bailey 2025-12-17 16:57 ` [PATCH v5 2/2] dts: rewrite two link topology requirements Andrew Bailey 2026-03-10 14:53 ` [PATCH v5 1/2] dts: make one link the default topology Patrick Robb 2026-03-10 15:06 ` Patrick Robb 2026-03-10 15:08 ` Patrick Robb
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox