From: Gregory Etelson <getelson@nvidia.com>
To: Jeremy Spewock <jspewock@iol.unh.edu>,
"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>
Cc: "Honnappa Nagarahalli" <Honnappa.Nagarahalli@arm.com>,
"Juraj Linkeš" <juraj.linkes@pantheon.tech>,
"Paul Szczepanek" <Paul.Szczepanek@arm.com>,
"Yoan Picchi" <yoan.picchi@foss.arm.com>,
"Patrick Robb" <probb@iol.unh.edu>,
"Luca Vizzarro" <Luca.Vizzarro@arm.com>,
"ci@dpdk.org" <ci@dpdk.org>, "dev@dpdk.org" <dev@dpdk.org>,
nd <nd@arm.com>, "Maayan Kashani" <mkashani@nvidia.com>,
"Asaf Penso" <asafp@nvidia.com>
Subject: Re: DTS testpmd and SCAPY integration
Date: Sun, 28 Jan 2024 13:44:22 +0000 [thread overview]
Message-ID: <IA1PR12MB6332E9E4BD9540479DDB943BA57F2@IA1PR12MB6332.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAAA20URwNgFq627F4evfkvF7waPpsb1rxoqd_wV-eko4QUCn6A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5671 bytes --]
Hello,
I've uploaded the code snapshot and functional description here:
https://drive.google.com/drive/folders/1cHrPwx4fUJ6ibUCtHd4kNKsrmmvQvvOj?usp=drive_link
Regards,
Gregory
________________________________
From: Jeremy Spewock <jspewock@iol.unh.edu>
Sent: Tuesday, January 23, 2024 20:26
To: NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>
Cc: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; Gregory Etelson <getelson@nvidia.com>; Juraj Linkeš <juraj.linkes@pantheon.tech>; Paul Szczepanek <Paul.Szczepanek@arm.com>; Yoan Picchi <yoan.picchi@foss.arm.com>; Patrick Robb <probb@iol.unh.edu>; Luca Vizzarro <Luca.Vizzarro@arm.com>; ci@dpdk.org <ci@dpdk.org>; dev@dpdk.org <dev@dpdk.org>; nd <nd@arm.com>
Subject: Re: DTS testpmd and SCAPY integration
External email: Use caution opening links or attachments
On Tue, Jan 23, 2024 at 3:50 AM Thomas Monjalon <thomas@monjalon.net<mailto:thomas@monjalon.net>> wrote:
23/01/2024 04:42, Honnappa Nagarahalli:
> > 08/01/2024 13:10, Luca Vizzarro:
> > > Your proposal sounds rather interesting. Certainly enabling DTS to
> > > accept YAML-written tests sounds more developer-friendly and should
> > > enable quicker test-writing. As this is an extra feature though – and
> > > a nice-to-have, it should definitely be discussed in the DTS meetings
> > > as Honnappa suggested already.
> >
> > I would not classify this idea as "nice-to-have".
> > I would split this proposal in 2 parts:
> > 1/ YAML is an implementation alternative.
> > 2/ Being able to write a test with a small number of lines,
> > reusing some commands from existing tools,
> > should be our "must-have" common goal.
> >
> > Others have mentioned that YAML may not be suitable in complex cases, and
> > that it would be an additional language for test writing.
> > I personnaly think we should focus on a single path which is easy to read and
> > maintain.
>
> I think we are digressing from the plan we had put forward if we have to go down this path.
> We should understand what it means by going down the YAML format.
> Also, what would happen if there is another innovation in 3 months?
There is a misunderstanding here.
I suggest to take this proposal as an example of the simplicity to reach.
But I agree with you it is more reasonnable to continue with the Python path.
I agree that it would be easier to develop both the framework and some of the more complex test cases in python and think sticking with Python is a good route.
I think taking this proposal and using it as an example of something we could work towards is also a great outlook because it gives a more structured goal instead of the idea being "let's just make it as simple as we can."
> We already have scatter-gather test suite ported to DPDK repo and has undergone review in the community.
>
> In the last meeting we went through a simple test case. Is it possible to write the scatter-gather test case in YAML and see how they compare?
After the latest CI meeting we thought about writing a simple text case
in Python with some virtual functions which would abstract all the boilerplate code,
so it would have the same level of simplicity as this YAML proposal.
Looking at what we have for DTS currently, we have put thought into achieving this and, in some categories, have made things similar to the YAML approach. Like, for example, when it comes to things like sending, receiving, and verifying a packet, all you have to do is create a packet and call a method. All of the boilerplate regarding how to send and receive and how it can be different between types of traffic generators, as well as setting up the ability to forward the packet is completely abstracted away from you. It's as simple as you send a packet and you get some packets back from the test suite perspective. The os_udp testing suite that Juraj wrote is a great example of this and how short the simple case can be. Additionally we have created centralized APIs between the SUT and TG nodes so that all of the methods that the developer would have to use can be accessed either through these nodes, or through the method inherited from the base class for test suites.
I think that when you try to make things extremely simple there is a common tradeoff; the more simplistic it is, the more restrictive it can become. We would have to make more assumptions about use cases and how things would look in these common cases. This generally isn't a super big problem in our case because if support for something that is needed is missing, we can add it to the API and with these test cases there are things that will generally be similar every time. This tradeoff can also be offset by creating the functions to make these things simple while still exposing less restrictive underlying methods so that more niche use cases can still be fulfilled. Just something to keep in mind.
> > For the configuration side, YAML is already used in DTS.
> > For the test suite logic, do you think we can achieve the same simplicity with
> > some Python code?
> >
> > We discussed how to progress with this proposal during the CI meeting last
> > week.
> > We need to check how it could look and what we can improve to reach this
> > goal.
> > Patrick proposes a meeting this Wednesday at 2pm UTC.
Generally I think this discussion is very useful and having some kind of ideal mock suite would also be useful to reference. It also can help shine a light on the importance of thinking about what things could be the common case and abstracting them away from the developer in the framework.
[-- Attachment #2: Type: text/html, Size: 9420 bytes --]
next prev parent reply other threads:[~2024-01-28 13:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-26 7:31 Etelson, Gregory
2024-01-08 1:55 ` Honnappa Nagarahalli
2024-01-08 6:10 ` Etelson, Gregory
2024-01-08 17:36 ` Honnappa Nagarahalli
2024-01-18 12:32 ` Juraj Linkeš
2024-01-19 20:01 ` Patrick Robb
2024-01-08 12:17 ` Luca Vizzarro
2024-01-08 17:35 ` Honnappa Nagarahalli
2024-01-08 12:10 ` Luca Vizzarro
2024-01-08 17:23 ` Etelson, Gregory
2024-01-22 17:31 ` Thomas Monjalon
2024-01-23 3:42 ` Honnappa Nagarahalli
2024-01-23 8:50 ` Thomas Monjalon
2024-01-23 18:26 ` Jeremy Spewock
2024-01-28 13:44 ` Gregory Etelson [this message]
2024-01-30 22:03 ` Patrick Robb
2024-01-31 7:42 ` Etelson, Gregory
2024-02-14 17:27 ` Gregory Etelson
2024-02-19 5:08 ` Patrick Robb
2024-02-20 13:35 ` Gregory Etelson
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=IA1PR12MB6332E9E4BD9540479DDB943BA57F2@IA1PR12MB6332.namprd12.prod.outlook.com \
--to=getelson@nvidia.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Luca.Vizzarro@arm.com \
--cc=Paul.Szczepanek@arm.com \
--cc=asafp@nvidia.com \
--cc=ci@dpdk.org \
--cc=dev@dpdk.org \
--cc=jspewock@iol.unh.edu \
--cc=juraj.linkes@pantheon.tech \
--cc=mkashani@nvidia.com \
--cc=nd@arm.com \
--cc=probb@iol.unh.edu \
--cc=thomas@monjalon.net \
--cc=yoan.picchi@foss.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).