|SUCCESS| [v1] dts: add sleep to trex setup
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Fri May 15 21:13:44 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/164009
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-05-15
I have reviewed the patch and found several issues:
git sha: 211668-1-abailey at iol.unh.edu
Author: Andrew Bailey <abailey at iol.unh.edu>
Subject: [PATCH v1] dts: add sleep to trex setup
This patch adds a 1-second sleep between TRex setup and packet sending to
resolve an issue where the single core performance test suite would report
zero Mpps.
> diff --git a/dts/framework/testbed_model/traffic_generator/trex.py b/dts/framework/testbed_model/traffic_generator/trex.py
> index 22cd20dea9..19a71a7dd5 100644
> --- a/dts/framework/testbed_model/traffic_generator/trex.py
> +++ b/dts/framework/testbed_model/traffic_generator/trex.py
> @@ -184,6 +184,7 @@ def _generate_traffic(
> """
> self._create_packet_stream(packet)
> self._setup_trex_client()
> + time.sleep(1)
The time module is not imported in this file. Does this code cause a
NameError when _generate_traffic() is called? The patch adds a call to
time.sleep() but I don't see a corresponding import statement for the time
module. Can you verify whether the time module is imported at the top of
this file?
Additionally, this approach uses a hardcoded sleep duration which may not
be reliable across different systems or load conditions. Would it be more
robust to implement a polling mechanism that waits for TRex to reach a
ready state after _setup_trex_client()? Does the TRex client API provide
any status checking methods that could be used instead of an arbitrary
sleep?
The commit message mentions this resolves cases where zero Mpps was
reported, but does not explain the root cause. Is the issue that
_setup_trex_client() returns before the client is actually ready to send
traffic? Understanding the underlying race condition would help determine
if a fixed sleep is the appropriate solution or if synchronization is
needed.
>
> stats = self._send_traffic_and_get_stats(duration, send_mpps)
More information about the test-report
mailing list