On Wed, Aug 5, 2026 at 11:37 AM Andrew Bailey <[email protected]> wrote:
> The single core forward performance test suite can run a variety of > combinations of buffer sizes and number of descriptors. It is beneficial > "it would be" > if any possible combination of these parameters could be tested against > a specific delta tolerance; Rather than a globally defined tolerance for > is semi colon right here? > all testing. Along with this, adjusting traffic duration and test > repetitions helps users define a more accurate test run if they wish to > get a more refined average. Furthermore, the cores allotted to TREX can > vary among systems and should be defined by the user. nit but can you call out the specific performance test in the commit title? > > Signed-off-by: Andrew Bailey <[email protected]> > > #: A union type discriminating traffic generators by the `type` field. > diff --git a/dts/framework/testbed_model/traffic_generator/trex.py > b/dts/framework/testbed_model/traffic_generator/trex.py > index d53791b0a6..2b52cfcbd1 100644 > --- a/dts/framework/testbed_model/traffic_generator/trex.py > +++ b/dts/framework/testbed_model/traffic_generator/trex.py > @@ -82,7 +82,7 @@ class TrexTrafficGenerator(PerformanceTrafficGenerator): > > _streaming_mode: TrexStatelessTXModes = TrexStatelessTXModes.STLTXCont > > - _tg_cores: int = 10 > + _tg_cores: int > Why not keep the default of 10 but allow cores as an optional parameter in test_run.yaml? I don't feel strongly about the matter but in general I don't want "config creep" when we can avoid it. Less config is better. But yes we can add config when necessary. > > _trex_app: BlockingApp > > @@ -102,6 +102,7 @@ def __init__(self, tg_node: Node, config: > TrexTrafficGeneratorConfig) -> None: > super().__init__(tg_node=tg_node, config=config) > self._tg_node_config = tg_node.config > self._tg_config = config > + self._tg_cores = config.cores > > self._os_session = create_session(self._tg_node.config, "TRex", > self._logger) > > diff --git a/dts/tests/TestSuite_single_core_forward_perf.py > b/dts/tests/TestSuite_single_core_forward_perf.py > index 57aecdf7a4..a966d44ebd 100644 > --- a/dts/tests/TestSuite_single_core_forward_perf.py > +++ b/dts/tests/TestSuite_single_core_forward_perf.py > @@ -32,14 +32,40 @@ class Config(BaseConfig): > """Performance test metrics.""" > > test_parameters: list[dict[str, int | float]] = [ > - {"frame_size": 64, "num_descriptors": 1024, "expected_mpps": > 1.00}, > - {"frame_size": 128, "num_descriptors": 1024, "expected_mpps": > 1.00}, > - {"frame_size": 256, "num_descriptors": 1024, "expected_mpps": > 1.00}, > - {"frame_size": 512, "num_descriptors": 1024, "expected_mpps": > 1.00}, > - {"frame_size": 1024, "num_descriptors": 1024, "expected_mpps": > 1.00}, > - {"frame_size": 1518, "num_descriptors": 1024, "expected_mpps": > 1.00}, > + {"frame_size": 64, "num_descriptors": 1024, "expected_mpps": > 1.00, "delta_tolerance": 0.05}, > + { > + "frame_size": 128, > + "num_descriptors": 1024, > + "expected_mpps": 1.00, > + "delta_tolerance": 0.05, > + }, > + { > + "frame_size": 256, > + "num_descriptors": 1024, > + "expected_mpps": 1.00, > + "delta_tolerance": 0.05, > + }, > + { > + "frame_size": 512, > + "num_descriptors": 1024, > + "expected_mpps": 1.00, > + "delta_tolerance": 0.05, > + }, > + { > + "frame_size": 1024, > + "num_descriptors": 1024, > + "expected_mpps": 1.00, > + "delta_tolerance": 0.05, > + }, > + { > + "frame_size": 1518, > + "num_descriptors": 1024, > + "expected_mpps": 1.00, > + "delta_tolerance": 0.05, > + }, > ] > - delta_tolerance: float = 0.05 > So, with this patch applied one MUST set the delta_tolerance per param, as opposed to optionally setting it per param or per testsuite? I'm not sure if it's a big lift to support both, but given that 99% of people probably want to just say "5% delta tolerance for single core forward perf testsuite" it would make sense to preserve that existing config option. > + traffic_duration: int = 5 > + test_repetitions: int = 5 > Do you need to update tests_config.example.yaml? And explain which parameters are optional vs required? > > > @requires_link_topology(LinkTopology.TWO_LINKS) > > Reviewed-by: Patrick Robb <[email protected]>

