<div dir="ltr">Thanks, yep not sure how I missed running dts-check-format!<div><br></div><div>Applied to next-dts with the dts-check-format fix squashed.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Nov 6, 2025 at 10:05 AM Andrew Bailey <<a href="mailto:abailey@iol.unh.edu">abailey@iol.unh.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"> Raises:<br>+        InteractiveCommandExecutionError: If the ports has been started but a port link will not come up.<br>nit: fails check-format because the line is too long.<div><br>Reviewed-by: Andrew Bailey <<a href="mailto:abailey@iol.unh.edu" target="_blank">abailey@iol.unh.edu</a>></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 5, 2025 at 2:50 PM Patrick Robb <<a href="mailto:probb@iol.unh.edu" target="_blank">probb@iol.unh.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When running our existing DTS testsuites on a new<br>
NIC we observed packets would not transmit from<br>
the traffic generator to the system under test<br>
even after DPDK testpmd and the NIC under test<br>
had indicated readiness. After investigation, we<br>
determined that the existing readiness check in DTS<br>
for testpmd start (checking that port is started)<br>
is insufficient, because on some systems the link<br>
will remain down for some measurable time, creating<br>
a race condition between the testpmd port's link<br>
coming up and the DTS execution reaching the packet<br>
transmission step. This change will ensure that<br>
testpmd start will block until the port is reporting<br>
that its link is up. In addition, the interval in<br>
between checking the link state has been reduced in<br>
order to speed up the execution.<br>
<br>
Signed-off-by: Patrick Robb <<a href="mailto:probb@iol.unh.edu" target="_blank">probb@iol.unh.edu</a>><br>
Tested-by: Patrick Robb <<a href="mailto:probb@iol.unh.edu" target="_blank">probb@iol.unh.edu</a>><br>
---<br>
 dts/api/testpmd/__init__.py | 9 ++++++++-<br>
 1 file changed, 8 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/dts/api/testpmd/__init__.py b/dts/api/testpmd/__init__.py<br>
index aadb7f4e70..49a847494a 100644<br>
--- a/dts/api/testpmd/__init__.py<br>
+++ b/dts/api/testpmd/__init__.py<br>
@@ -93,6 +93,9 @@ def _requires_started_ports(func: TestPmdMethod) -> TestPmdMethod:<br>
<br>
     Args:<br>
         func: The :class:`TestPmd` method to decorate.<br>
+<br>
+    Raises:<br>
+        InteractiveCommandExecutionError: If the ports has been started but a port link will not come up.<br>
     """<br>
<br>
     @functools.wraps(func)<br>
@@ -100,6 +103,10 @@ def _wrapper(self: "TestPmd", *args: P.args, **kwargs: P.kwargs) -> Any:<br>
         if not self.ports_started:<br>
             self._logger.debug("Ports need to be started to continue.")<br>
             self.start_all_ports()<br>
+        if get_ctx().topology.type is not LinkTopology.NO_LINK:<br>
+            for port in self.ports:<br>
+                if not self.wait_link_status_up(<a href="http://port.id" rel="noreferrer" target="_blank">port.id</a>):<br>
+                    raise InteractiveCommandExecutionError(f"Port {<a href="http://port.id" rel="noreferrer" target="_blank">port.id</a>} link failed to come up.")<br>
<br>
         return func(self, *args, **kwargs)<br>
<br>
@@ -265,7 +272,7 @@ def wait_link_status_up(self, port_id: int, timeout=SETTINGS.timeout) -> bool:<br>
             port_info = self.send_command(f"show port info {port_id}")<br>
             if "Link status: up" in port_info:<br>
                 break<br>
-            time.sleep(0.5)<br>
+            time.sleep(0.25)<br>
         else:<br>
             self._logger.error(f"The link for port {port_id} did not come up in the given timeout.")<br>
         return "Link status: up" in port_info<br>
-- <br>
2.49.0<br>
<br>
</blockquote></div>
</blockquote></div>