DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nicholas Pratte <npratte@iol.unh.edu>
To: Jeremy Spewock <jspewock@iol.unh.edu>
Cc: Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu,
	 juraj.linkes@pantheon.tech, paul.szczepanek@arm.com,
	luca.vizzarro@arm.com,  yoan.picchi@foss.arm.com,
	dmarx@iol.unh.edu, dev@dpdk.org
Subject: Re: [PATCH v2 2/3] dts: add testpmd methods for test suite
Date: Wed, 17 Jul 2024 15:57:32 -0400	[thread overview]
Message-ID: <CAKXZ7eiR4411mjYhtUsQrBKyJ3xvFbBOqZmhcRztgukpD3Y2YQ@mail.gmail.com> (raw)
In-Reply-To: <CAAA20URwvHPJJjeOO=BWu6wNWb4z1FaVuNf=K9wN+a6gEnF=Dg@mail.gmail.com>

On Thu, Jul 11, 2024 at 3:33 PM Jeremy Spewock <jspewock@iol.unh.edu> wrote:
>
> There were a few emails that came through for this series but this was
> the most recent one so I went with reviewing this one, but it looks
> like the more descriptive commit subject got lost in this iteration.
> It would probably be worth adding that back.
>
> Additionally, it looks like the functions you added here (including
> the ones added from the VLAN suite, but I believe those ones are
> already fixed in the latest version ) are all missing their return
> types. Of course they don't return anything, but that is still useful
> to note by annotating it as "None".

Surprised I never saw that. I'll fix this.


> On Tue, Jul 2, 2024 at 3:25 PM Nicholas Pratte <npratte@iol.unh.edu> wrote:
> >
> > Several new methods have been added to TestPMDShell in order to produce
> > the mac filter's individual test cases:
> >  - set_mac_addr
> >  - set_multicast_mac_addr
> >  - rx_vlan_add
> >  - rx_vlan_rm
> >  - vlan_filter_set_on
> >  - vlan_filter_set_off
> >  - set_promisc
> >
> > set_mac_addr and set_multicast_addr were created for the mac filter test
> > suite, enabling users to both add or remove mac and multicast
> > addresses based on a booling 'add or remove' parameter. The success or
>
> I think this is a typo and "booling" should be "boolean" but I could be wrong.

Good catch!

>
> > failure of each call can be verified if a user deems it necessary.
> >
> > The other methods listed are implemented in other respective test
> > suites, and their implementations have been copied, but are subject to
> > change; they are not the focus of this patch.
> >
> > Bugzilla ID: 1454
> > Signed-off-by: Nicholas Pratte <npratte@iol.unh.edu>
> > ---
> >  dts/framework/remote_session/testpmd_shell.py | 177 ++++++++++++++++++
> >  dts/tests/TestSuite_mac_filter.py             |   0
>
> It looks like creating the file somehow snuck into the diff for this
> commit instead of the other one that populates it.

Strange. I can fix that real quick.

>
> >  2 files changed, 177 insertions(+)
> >  create mode 100644 dts/tests/TestSuite_mac_filter.py
> >
> > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
> > index ec22f72221..0be1fb8754 100644
> > --- a/dts/framework/remote_session/testpmd_shell.py
> > +++ b/dts/framework/remote_session/testpmd_shell.py
> <snip>
> > +    def set_multicast_mac_addr(self, port_id: int, multi_addr: str, add: bool, verify: bool = True):
> > +        """Add or remove multicast mac address to a specified port filter.
>
> Just to make this more clear that you specify the port and not the
> port filter, it might be helpful here to show that the port possesses
> the filter by saying "a specified port's filter."

Yes. This was just a typo. What you have here is what I was going for.

>
> > +
> > +        Args:
> > +            port_id: The port ID the multicast address is set on.
> > +            multi_addr: The multicast address to be added to the filter.
> > +            add: If :data:'True', add the specified multicast address to the port filter.
> > +                If :data:'False', remove the specified multicast address from the port filter.
> > +            verify: If :data:'True', assert that the 'mcast_addr' operations was successful.
> > +                If :data:'False', execute the 'mcast_addr' operation and skip the assertion.
> > +
> > +        Raises:
> > +            InteractiveCommandExecutionError: If either the 'add' or 'remove' operations fails.
> > +        """
> > +        mcast_cmd = "add" if add else "remove"
> > +        output = self.send_command(f"mcast_addr {mcast_cmd} {port_id} {multi_addr}")
> > +        if "Bad arguments" in output:
> > +            self._logger.debug("Invalid arguments provided to mcast_addr")
> > +            raise InteractiveCommandExecutionError("Invalid argument provided")
> > +
> > +        if verify:
> > +            if (
> > +                "Invalid multicast_addr" in output
> > +                or f'multicast address {"already" if add else "not"} filtered by port' in output
> > +            ):
> > +                self._logger.debug(f"Failed to {mcast_cmd} {multi_addr} on port {port_id}")
> > +                raise InteractiveCommandExecutionError(
> > +                    f"Failed to {mcast_cmd} {multi_addr} on port {port_id} \n{output}"
> > +                )
> <snip>
>
> >      def show_port_stats_all(self) -> list[TestPmdPortStats]:
> >          """Returns the statistics of all the ports.
> >
> > diff --git a/dts/tests/TestSuite_mac_filter.py b/dts/tests/TestSuite_mac_filter.py
> > new file mode 100644
> > index 0000000000..e69de29bb2
> > --
> > 2.44.0
> >

  reply	other threads:[~2024-07-17 19:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 19:24 [PATCH v2 0/3] Mac Filter Port to New DTS Nicholas Pratte
2024-07-02 19:24 ` [PATCH v2 1/3] dts: add boolean to adjust addresses Nicholas Pratte
2024-07-11 19:31   ` Jeremy Spewock
2024-07-17 17:19     ` Nicholas Pratte
2024-07-19 15:37     ` Jeremy Spewock
2024-07-22 13:09   ` Dean Marx
2024-07-02 19:24 ` [PATCH v2 2/3] dts: add testpmd methods for test suite Nicholas Pratte
2024-07-11 19:33   ` Jeremy Spewock
2024-07-17 19:57     ` Nicholas Pratte [this message]
2024-07-02 19:24 ` [PATCH v2 3/3] dts: mac filter test suite refactored for new dts Nicholas Pratte
2024-07-11 19:34   ` Jeremy Spewock
2024-07-18 19:05 ` [PATCH v3 0/3] Mac Filter Port to New DTS Nicholas Pratte
2024-07-18 19:05   ` [PATCH v3 1/3] dts: add boolean to adjust addresses Nicholas Pratte
2024-07-18 19:05   ` [PATCH v3 2/3] dts: add methods for setting mac and multicast addresses Nicholas Pratte
2024-07-19 15:37     ` Jeremy Spewock
2024-07-22 13:08     ` Dean Marx
2024-07-18 19:40   ` [PATCH v3 3/3] dts: mac filter test suite refactored for new dts Nicholas Pratte
2024-07-19 15:38     ` Jeremy Spewock
2024-07-22 13:08     ` Dean Marx
2024-07-26 16:39 ` [PATCH v4 0/2] Mac Filter Port to New DTS Nicholas Pratte
2024-07-26 16:45   ` [PATCH v4 1/2] dts: add methods for setting mac and multicast addresses Nicholas Pratte
2024-08-02 20:26     ` Jeremy Spewock
2024-08-12 18:58     ` Dean Marx
2024-09-09 18:29     ` Dean Marx
2024-07-26 16:46   ` [PATCH v4 2/2] dts: mac filter test suite refactored for new dts Nicholas Pratte
2024-08-02 20:25     ` Jeremy Spewock
2024-08-02 20:27       ` Jeremy Spewock
2024-08-12 18:47     ` Dean Marx
2024-09-04 21:14     ` Dean Marx
2024-09-05 19:11       ` Nicholas Pratte
2024-09-09 18:28     ` Dean Marx
2024-07-26 16:39 ` [PATCH v4 1/2] dts: add methods for setting mac and multicast addresses Nicholas Pratte
2024-08-02 20:02   ` Jeremy Spewock
2024-07-26 16:39 ` [PATCH v4 2/2] dts: mac filter test suite refactored for new dts Nicholas Pratte
2024-08-02 20:02   ` Jeremy Spewock
2024-09-12 19:00 ` [PATCH v5 0/2] Mac Filter Port to New DTS Nicholas Pratte
2024-09-12 19:00   ` [PATCH v5 1/2] dts: add methods for setting mac and multicast addresses Nicholas Pratte
2024-09-12 19:00   ` [PATCH v5 2/2] dts: mac filter test suite refactored for new dts Nicholas Pratte
  -- strict thread matches above, loose matches on Subject: below --
2024-06-21 17:20 [PATCH 0/3] Mac Filter Port to New DTS Nicholas Pratte
2024-07-02 19:11 ` [PATCH v2 2/3] dts: add testpmd methods for test suite Nicholas Pratte

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=CAKXZ7eiR4411mjYhtUsQrBKyJ3xvFbBOqZmhcRztgukpD3Y2YQ@mail.gmail.com \
    --to=npratte@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=jspewock@iol.unh.edu \
    --cc=juraj.linkes@pantheon.tech \
    --cc=luca.vizzarro@arm.com \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --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).