patch 'dts: add retry loop to TRex traffic generation' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Thu Jul 30 11:16:05 CEST 2026
Hi,
FYI, your patch has been queued to stable release 25.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/04/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6935e1da836864d9b261c05c30e1374ea2eff545
Thanks.
Kevin
---
>From 6935e1da836864d9b261c05c30e1374ea2eff545 Mon Sep 17 00:00:00 2001
From: Andrew Bailey <abailey at iol.unh.edu>
Date: Wed, 17 Jun 2026 11:57:48 -0400
Subject: [PATCH] dts: add retry loop to TRex traffic generation
[ upstream commit 5c1beacb2c7a383567320a887ff5042d74737ff1 ]
There was an issue where the single core forward test would report zero
MPPS intermittently. This was due to TREX reporting that the link was
down when the client was called to start generating traffic. The links
were being reported down by TREX on the TG even when testpmd was
reporting them up on the SUT. Adding a retry loop to the generate
traffic method of TREX gives the TG enough time to set up and send
traffic.
Bugzilla ID: 1946
Fixes: d77d7f04f24c ("dts: add single-core performance test suite")
Signed-off-by: Andrew Bailey <abailey at iol.unh.edu>
Reviewed-by: Patrick Robb <patrickrobb1997 at gmail.com>
---
.../testbed_model/traffic_generator/trex.py | 38 ++++++++++++++-----
1 file changed, 29 insertions(+), 9 deletions(-)
diff --git a/dts/framework/testbed_model/traffic_generator/trex.py b/dts/framework/testbed_model/traffic_generator/trex.py
index 22cd20dea9..2abfbfc5ab 100644
--- a/dts/framework/testbed_model/traffic_generator/trex.py
+++ b/dts/framework/testbed_model/traffic_generator/trex.py
@@ -14,4 +14,5 @@ from scapy.packet import Packet
from framework.config.node import OS, NodeConfiguration
from framework.config.test_run import TrexTrafficGeneratorConfig
+from framework.exception import SSHTimeoutError
from framework.parser import TextParser
from framework.remote_session.blocking_app import BlockingApp
@@ -221,5 +222,7 @@ class TrexTrafficGenerator(PerformanceTrafficGenerator):
self._shell.send_command("\n".join(packet_stream))
- def _send_traffic_and_get_stats(self, duration: float, send_mpps: float | None = None) -> str:
+ def _send_traffic_and_get_stats(
+ self, duration: float, send_mpps: float | None = None, retry_attempts: int = 5
+ ) -> str:
"""Send traffic and get TG Rx stats.
@@ -231,13 +234,30 @@ class TrexTrafficGenerator(PerformanceTrafficGenerator):
duration: The traffic generation duration.
send_mpps: The millions of packets per second for TRex to send from each port.
+ retry_attempts: The number of times to retry this command on failure.
+
+ Raises:
+ SSHTimeoutError: If TRex fails to send traffic in the allotted attempts.
"""
- if send_mpps:
- self._shell.send_command(f"""{self.stl_client_name}.start(ports=[0, 1],
- mult = '{send_mpps}mpps',
- duration = {duration})""")
- else:
- self._shell.send_command(f"""{self.stl_client_name}.start(ports=[0, 1],
- mult = '100%',
- duration = {duration})""")
+ link_down = True
+ attempt = 0
+
+ while link_down and attempt < retry_attempts:
+ if send_mpps:
+ result = self._shell.send_command(f"""{self.stl_client_name}.start(ports=[0, 1],
+ mult = '{send_mpps}mpps',
+ duration = {duration})""")
+ else:
+ result = self._shell.send_command(f"""{self.stl_client_name}.start(ports=[0, 1],
+ mult = '100%',
+ duration = {duration})""")
+ link_down = "link is DOWN" in result
+ if link_down:
+ self._logger.info(
+ f"Generate traffic command failed (attempt {attempt + 1} of {retry_attempts})"
+ )
+ time.sleep(0.25)
+ attempt += 1
+ if link_down:
+ raise SSHTimeoutError("Link failed to come up, Traffic could not be generated.")
time.sleep(duration)
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-30 10:16:02.269480998 +0100
+++ 0026-dts-add-retry-loop-to-TRex-traffic-generation.patch 2026-07-30 10:16:01.465990790 +0100
@@ -1 +1 @@
-From 5c1beacb2c7a383567320a887ff5042d74737ff1 Mon Sep 17 00:00:00 2001
+From 6935e1da836864d9b261c05c30e1374ea2eff545 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 5c1beacb2c7a383567320a887ff5042d74737ff1 ]
More information about the stable
mailing list