From: Luca Vizzarro <Luca.Vizzarro@arm.com>
To: Patrick Robb <probb@iol.unh.edu>, Paul.Szczepanek@arm.com
Cc: dev@dpdk.org, dmarx@iol.unh.edu, nprattedev@gmail.com,
mmahajan@iol.unh.edu, abailey@iol.unh.edu, thomas.wilks@arm.com,
Nicholas Pratte <npratte@iol.unh.edu>
Subject: Re: [PATCH v3 2/5] dts: rework traffic generator inheritance structure
Date: Wed, 2 Jul 2025 16:31:29 +0100 [thread overview]
Message-ID: <f7b7e8c3-1033-4fe8-8e05-1992fc6f271b@arm.com> (raw)
In-Reply-To: <20250702052154.381690-2-probb@iol.unh.edu>
On 02/07/2025 06:21, Patrick Robb wrote:
> +++ b/dts/framework/testbed_model/traffic_generator/performance_traffic_generator.py
> @@ -0,0 +1,63 @@
> <snip>
> +
> +@dataclass(slots=True)
> +class PerformanceTrafficStats(ABC):
Why is this inheriting ABC? I don't see why a dataclass would be
abstract given it's even missing abstract methods.
> <snip>
> +class PerformanceTrafficGenerator(TrafficGenerator):
> + """An abstract base class for all performance-oriented traffic generators.
> +
> + Provides an intermediary interface for performance-based traffic generator.
> + """
> +
> + @abstractmethod
> + def calculate_traffic_and_stats(
> + self,
> + packet: Packet,
> + send_mpps: int,
> + duration: float,
> + ) -> PerformanceTrafficStats:
> + """Send packet traffic and acquire associated statistics.
> +
> + Args:
> + packet: The packet to send.
> + send_mpps: The millions packets per second send rate.
> + duration: Performance test duration (in seconds).
bad indentation for args.
> diff --git a/dts/framework/testbed_model/traffic_generator/scapy.py b/dts/framework/testbed_model/traffic_generator/scapy.py
> index e21ba4ed96..602b93d473 100644
> --- a/dts/framework/testbed_model/traffic_generator/scapy.py
> +++ b/dts/framework/testbed_model/traffic_generator/scapy.py
> @@ -26,7 +26,7 @@
> from scapy.packet import Packet
>
> from framework.config.node import OS
> -from framework.config.test_run import ScapyTrafficGeneratorConfig
> +from framework.config.test_run import TrafficGeneratorConfig
Making the Scapy class use a more generic config class looks like
breaking behaviour. Why is this happening?
> @@ -332,6 +332,10 @@ def setup(self, topology: Topology):
> self._shell.send_command("from scapy.all import *")
> self._shell.send_command("from scapy.contrib.lldp import *")
>
> + def teardown(self):
> + """Overrides :meth:`.traffic_generator.TrafficGenerator.teardown`."""
> + pass
nit: `pass` is not needed here, because the docstring already completes
the method as noop.
> <snip>
> diff --git a/dts/framework/testbed_model/traffic_generator/traffic_generator.py b/dts/framework/testbed_model/traffic_generator/traffic_generator.py
> index 8f53b07daf..ea3075989d 100644
> --- a/dts/framework/testbed_model/traffic_generator/traffic_generator.py
> +++ b/dts/framework/testbed_model/traffic_generator/traffic_generator.py
> @@ -10,14 +10,10 @@
> <snip>
>
> class TrafficGenerator(ABC):
> @@ -54,46 +50,6 @@ def setup(self, topology: Topology):
>
> def teardown(self):
> """Teardown the traffic generator."""
> - self.close()
how come are we removing the default close behaviour? I don't see it
being replaced appropriately.
> <snip>
> - @property
> - def is_capturing(self) -> bool:
> - """This traffic generator can't capture traffic."""
> - return False
Why is the above property being removed?
>
> @abstractmethod
> def close(self) -> None:
next prev parent reply other threads:[~2025-07-02 15:31 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 19:40 [RFC Patch v1 0/5] Add TREX Traffic Generator to DTS Framework Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 1/5] dts: rework config module to support perf TGs Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 2/5] dts: rework traffic generator inheritance structure Nicholas Pratte
2025-05-15 19:24 ` Patrick Robb
2025-05-16 19:12 ` Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 3/5] dts: add asychronous support to ssh sessions Nicholas Pratte
2025-05-15 19:24 ` Patrick Robb
2025-04-23 19:40 ` [RFC Patch v1 4/5] dts: add trex traffic generator to dts framework Nicholas Pratte
2025-05-15 19:25 ` Patrick Robb
2025-05-16 19:45 ` Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 5/5] dts: add performance test functions to test suite api Nicholas Pratte
2025-05-15 19:25 ` Patrick Robb
2025-05-16 20:18 ` [RFC v2 0/6] Add TREX Traffic Generator to DTS Framework Nicholas Pratte
2025-05-16 20:18 ` [RFC v2 1/6] dts: rework config module to support perf TGs Nicholas Pratte
2025-05-20 20:33 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 2/6] dts: rework traffic generator inheritance structure Nicholas Pratte
2025-05-21 20:36 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 3/6] dts: add asynchronous support to ssh sessions Nicholas Pratte
2025-05-22 15:04 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 4/6] dts: add extended timeout option to interactive shells Nicholas Pratte
2025-05-22 15:10 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 5/6] dts: add trex traffic generator to dts framework Nicholas Pratte
2025-05-22 16:55 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 6/6] dts: add performance test functions to test suite api Nicholas Pratte
2025-05-22 17:54 ` Dean Marx
2025-07-02 5:21 ` [PATCH v3 1/5] dts: rework config module to support perf TGs Patrick Robb
2025-07-02 5:21 ` [PATCH v3 2/5] dts: rework traffic generator inheritance structure Patrick Robb
2025-07-02 15:31 ` Luca Vizzarro [this message]
2025-07-02 5:21 ` [PATCH v3 3/5] dts: add timeout override option to interactive shells Patrick Robb
2025-07-02 15:33 ` Luca Vizzarro
2025-07-02 5:21 ` [PATCH v3 4/5] dts: add trex traffic generator to dts framework Patrick Robb
2025-07-02 16:32 ` Luca Vizzarro
2025-07-02 5:21 ` [PATCH v3 5/5] dts: add performance test functions to test suite API Patrick Robb
2025-07-02 16:37 ` Luca Vizzarro
2025-07-02 15:09 ` [PATCH v3 1/5] dts: rework config module to support perf TGs Luca Vizzarro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7b7e8c3-1033-4fe8-8e05-1992fc6f271b@arm.com \
--to=luca.vizzarro@arm.com \
--cc=Paul.Szczepanek@arm.com \
--cc=abailey@iol.unh.edu \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=mmahajan@iol.unh.edu \
--cc=npratte@iol.unh.edu \
--cc=nprattedev@gmail.com \
--cc=probb@iol.unh.edu \
--cc=thomas.wilks@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).