On Fri, Jun 14, 2024 at 4:29 PM Jeremy Spewock <jspew...@iol.unh.edu> wrote:

> > I wonder whether, when convenient, we want to name the methods more or
> > less 1:1 according to the actual testpmd text command they send? I.e.
> > in this case should the method be named vlan_set_filter_on instead of
> > vlan_filter_set_on (aligns better with "vlan set filter on {port}")?
> > The intellisense provided by the testpmd methods is indeed a QoL
> > improvement for folks writing testsuites, but at the same time people
> > who use testpmd will always have the real commands ingrained in their
> > thoughts, so if we try to stay as true to those as possible, we get
> > the stability and intellisense and also the method names are still
> > intuitive.
>
> I generally try to name these methods in a more human-readable way, so
> my intuition would lean more towards naming it something like
> `set_vlan_filter_on` or `set_vlan_strip_on`. I could see how it might
> make it easier for some testpmd developers, so I'm not sure which
> would be better. Personally, as someone who is less familiar with all
> the ins and outs of testpmd, I prefer the human-readable approach.

I think this is compelling, but to play devil's advocate, I also think
it's not just testpmd developers who might care. The broad community
of DPDK developers, who are working on DPDK features and might want to
write DTS testsuites in the future, are probably also already pretty
familiar with testpmd params. If they start using the framework, it
may be a benefit for the method names to be intuitive, so they don't
have to in essence relearn how to use testpmd just to write testsuites
for DTS. Probably not a big deal given as you say the human readable
approach is pretty intuitive too... anyways maybe this can be a
discussion point at the DTS meeting next week.

I guess people can always fall back on testpmd.send_command() if they
don't like the human readable methods...? Or would we want to ban
that?

https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html

Should testpmd class have a method for each runtime command? It's a
long list. Or just methods for the most common commands? Well, we'll
chat at the DTS meeting.

>
> >
> > Maybe even think tiny things like renaming the method set_forward_mode
> > to set_fwd_mode to align 1:1 with testpmd is good.
> >
> > That's just my perspective though - I would be interested to see
> > whether others feel the same or not.
> >
> <snip>
> > > 2.44.0
> > >

Reply via email to