DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeremy Spewock <jspewock@iol.unh.edu>
To: Dean Marx <dmarx@iol.unh.edu>
Cc: Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech,
	 probb@iol.unh.edu, paul.szczepanek@arm.com,
	yoan.picchi@foss.arm.com,  bruce.richardson@intel.com,
	luca.vizzarro@arm.com, dev@dpdk.org
Subject: Re: [PATCH v3 4/4] dts: dynamic config test suite
Date: Wed, 10 Jul 2024 12:45:59 -0400	[thread overview]
Message-ID: <CAAA20UQm3WTMX+5SVSVSfaYhjT--Y2qGrOV4=oJON3UAgYL+rg@mail.gmail.com> (raw)
In-Reply-To: <20240708193012.5465-4-dmarx@iol.unh.edu>

On Mon, Jul 8, 2024 at 3:30 PM Dean Marx <dmarx@iol.unh.edu> wrote:
>
> Suite for testing ability of Poll Mode Driver to turn promiscuous
> mode on/off, allmulticast mode on/off, and show expected behavior
> when sending packets with known, unknown, broadcast, and multicast
> destination MAC addresses.
>
> Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
> ---
>  dts/tests/TestSuite_dynamic_config.py | 149 ++++++++++++++++++++++++++
>  1 file changed, 149 insertions(+)
>  create mode 100644 dts/tests/TestSuite_dynamic_config.py
>
> diff --git a/dts/tests/TestSuite_dynamic_config.py b/dts/tests/TestSuite_dynamic_config.py
> new file mode 100644
> index 0000000000..a6e5384c50
> --- /dev/null
> +++ b/dts/tests/TestSuite_dynamic_config.py
> @@ -0,0 +1,149 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2024 University of New Hampshire
> +
> +"""Dynamic configuration capabilities test suite.
> +
> +This suite checks that it is possible to change the configuration of a port
> +dynamically. The Poll Mode Driver should be able to enable and disable
> +promiscuous mode on each port, as well as check the Rx and Tx packets of
> +each port

It might be worth explaining here more of what specifically is being
checked by the PMD. It seems like there is different expected output
based on whether promisc mode is on or not as well as different
behaviors with different MAC addresses.
.
> +
> +If packets should be received and forwarded, or received and not forwarded,
> +depending on the configuration, the port info should match the expected behavior.
> +"""
<snip>
> +    def test_default_mode(self) -> None:
> +        """Tests default configuration.
> +
> +        Creates a testpmd shell, verifies that promiscuous mode is enabled by default,
> +        and sends two packets; one matching source MAC address and one unknown.
> +        Verifies that both are received.
> +        """
> +        testpmd = TestPmdShell(node=self.sut_node)
> +        isPromisc = testpmd.show_port_info(0).is_promiscuous_mode_enabled
> +        self.verify(isPromisc, "Promiscuous mode was not enabled by default.")
> +        testpmd.start()
> +        mac = testpmd.show_port_info(0).mac_address
> +        # send a packet with Rx port mac address
> +        self.send_packet_and_verify(should_receive=True, mac_address=str(mac))
> +        # send a packet with mismatched mac address
> +        self.send_packet_and_verify(should_receive=True, mac_address="00:00:00:00:00:00")

We should be careful using the MAC address that is all 0s as that is a
special address that is reserved for localhost. I think it would still
work in this case since it wouldn't match the address of the tester's
port anyway, but it might be safer to just make the last digit of this
a 1 regardless.

> +        testpmd.close()
> +        sleep(6)
> +
<snip>
> 2.44.0
>

  reply	other threads:[~2024-07-10 16:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 19:19 [PATCH v2 0/4] dts: initial dynamic config suite Dean Marx
2024-07-08 19:19 ` [PATCH v2 1/4] dts: add multicast set function to shell Dean Marx
2024-07-10 16:44   ` Jeremy Spewock
2024-07-08 19:19 ` [PATCH v2 2/4] dts: add toggle option to send and capture Dean Marx
2024-07-08 19:19 ` [PATCH v2 3/4] dts: dynamic config conf schema Dean Marx
2024-07-08 19:19 ` [PATCH v2 4/4] dts: dynamic config test suite Dean Marx
2024-07-08 19:30 ` [PATCH v3 1/4] dts: add multicast set function to shell Dean Marx
2024-07-08 19:30   ` [PATCH v3 2/4] dts: add toggle option to send and capture Dean Marx
2024-07-10 16:13     ` Jeremy Spewock
2024-07-08 19:30   ` [PATCH v3 3/4] dts: dynamic config conf schema Dean Marx
2024-07-10 16:45     ` Jeremy Spewock
2024-07-08 19:30   ` [PATCH v3 4/4] dts: dynamic config test suite Dean Marx
2024-07-10 16:45     ` Jeremy Spewock [this message]
2024-07-15 16:00 ` [PATCH v4 1/3] dts: add multicast set function to shell Dean Marx
2024-07-15 16:00   ` [PATCH v4 2/3] dts: dynamic config conf schema Dean Marx
2024-07-15 20:22     ` Jeremy Spewock
2024-07-15 16:00   ` [PATCH v4 3/3] dts: dynamic config test suite Dean Marx
2024-07-15 20:22     ` Jeremy Spewock
2024-07-15 20:22   ` [PATCH v4 1/3] dts: add multicast set function to shell Jeremy Spewock
2024-07-24 19:21 ` [PATCH v5 0/3] dts: refactored dynamic config test suite Dean Marx
2024-07-24 19:21   ` [PATCH v5 1/3] dts: add multicast set function to shell Dean Marx
2024-08-07 15:50     ` Luca Vizzarro
2024-07-24 19:21   ` [PATCH v5 2/3] dts: dynamic config conf schema Dean Marx
2024-07-26 19:35     ` Jeremy Spewock
2024-08-07 15:56     ` Luca Vizzarro
2024-07-24 19:21   ` [PATCH v5 3/3] dts: dynamic config test suite Dean Marx
2024-07-26 19:35     ` Jeremy Spewock
2024-08-07 19:18   ` [PATCH v6 0/2] dts: refactored " Dean Marx
2024-08-07 19:18     ` [PATCH v6 1/2] dts: add multicast set function to shell Dean Marx
2024-08-07 19:18     ` [PATCH v6 2/2] dts: dynamic config test suite Dean Marx

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='CAAA20UQm3WTMX+5SVSVSfaYhjT--Y2qGrOV4=oJON3UAgYL+rg@mail.gmail.com' \
    --to=jspewock@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmarx@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).