DPDK patches and discussions
 help / color / mirror / Atom feed
From: Patrick Robb <probb@iol.unh.edu>
To: Luca Vizzarro <luca.vizzarro@arm.com>
Cc: dev@dpdk.org, Paul Szczepanek <paul.szczepanek@arm.com>,
	 Thomas Wilks <thomas.wilks@arm.com>,
	Dean Marx <dmarx@iol.unh.edu>
Subject: Re: [PATCH v3 3/3] dts: add l2fwd test suite
Date: Wed, 13 Nov 2024 10:37:14 -0500	[thread overview]
Message-ID: <CAJvnSUB5G63dXqTuQxhTrb1E4z9-B=2W8ZRpftiNvaFoZBQY-Q@mail.gmail.com> (raw)
In-Reply-To: <20241108170138.203096-4-luca.vizzarro@arm.com>

[-- Attachment #1: Type: text/plain, Size: 3772 bytes --]

Reviewed-by: Patrick Robb <probb@iol.unh.edu>
Tested-by: Patrick Robb <probb@iol.unh.edu>

On Fri, Nov 8, 2024 at 12:01 PM Luca Vizzarro <luca.vizzarro@arm.com> wrote:

> Add a basic L2 forwarding test suite which tests the correct
> functionality of the forwarding facility built-in in the DPDK.
>
> The tests are performed with different queues numbers per port.
>
> Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
> Signed-off-by: Thomas Wilks <thomas.wilks@arm.com>
> Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>
> Reviewed-by: Dean Marx <dmarx@iol.unh.edu>
> Reviewed-by: Patrick Robb <probb@iol.unh.edu>
> Tested-by: Patrick Robb <probb@iol.unh.edu>
> ---
>  dts/tests/TestSuite_l2fwd.py | 63 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 dts/tests/TestSuite_l2fwd.py
>
> diff --git a/dts/tests/TestSuite_l2fwd.py b/dts/tests/TestSuite_l2fwd.py
> new file mode 100644
> index 0000000000..0f6ff18907
> --- /dev/null
> +++ b/dts/tests/TestSuite_l2fwd.py
> @@ -0,0 +1,63 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2024 Arm Limited
> +
> +"""Basic L2 forwarding test suite.
> +
> +This testing suites runs basic L2 forwarding on testpmd across multiple
> different queue sizes.
> +The forwarding test is performed with several packets being sent at once.
> +"""
> +
> +from framework.params.testpmd import EthPeer, SimpleForwardingModes
> +from framework.remote_session.testpmd_shell import TestPmdShell
> +from framework.test_suite import TestSuite, func_test
> +from framework.testbed_model.capability import requires
> +from framework.testbed_model.cpu import LogicalCoreCount
> +from framework.testbed_model.topology import TopologyType
> +from framework.utils import generate_random_packets
> +
> +
> +@requires(topology_type=TopologyType.two_links)
> +class TestL2fwd(TestSuite):
> +    """L2 forwarding test suite."""
> +
> +    #: The total number of packets to generate and send for forwarding.
> +    NUMBER_OF_PACKETS_TO_SEND = 50
> +    #: The payload size to use for the generated packets in bytes.
> +    PAYLOAD_SIZE = 100
> +
> +    def set_up_suite(self) -> None:
> +        """Set up the test suite.
> +
> +        Setup:
> +            Generate the random packets that will be sent.
> +        """
> +        self.packets =
> generate_random_packets(self.NUMBER_OF_PACKETS_TO_SEND, self.PAYLOAD_SIZE)
> +
> +    @func_test
> +    def l2fwd_integrity(self) -> None:
> +        """Test the L2 forwarding integrity.
> +
> +        Test:
> +            Configure a testpmd shell with a different numbers of queues
> (1, 2, 4 and 8) per run.
> +            Start up L2 forwarding, send random packets from the TG and
> verify they were all
> +            received back.
> +        """
> +        queues = [1, 2, 4, 8]
> +
> +        with TestPmdShell(
> +            self.sut_node,
> +            lcore_filter_specifier=LogicalCoreCount(cores_per_socket=4),
> +            forward_mode=SimpleForwardingModes.mac,
> +            eth_peer=[EthPeer(1, self.tg_node.ports[1].mac_address)],
> +            disable_device_start=True,
> +        ) as shell:
> +            for queues_num in queues:
> +                self._logger.info(f"Testing L2 forwarding with
> {queues_num} queue(s)")
> +                shell.set_ports_queues(queues_num)
> +                shell.start()
> +
> +                received_packets =
> self.send_packets_and_capture(self.packets)
> +                expected_packets = self.get_expected_packets(self.packets)
> +                self.match_all_packets(expected_packets, received_packets)
> +
> +                shell.stop()
> --
> 2.43.0
>
>

[-- Attachment #2: Type: text/html, Size: 5064 bytes --]

  reply	other threads:[~2024-11-13 15:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 12:51 [PATCH] " Luca Vizzarro
2024-08-09 15:27 ` Jeremy Spewock
2024-09-09 10:44   ` Luca Vizzarro
2024-09-04 18:11 ` Dean Marx
2024-09-09 15:05 ` Patrick Robb
2024-09-09 17:54 ` Nicholas Pratte
2024-10-30 15:03 ` [PATCH v2] " Thomas Wilks
2024-11-08 17:01 ` [PATCH v3 0/3] " Luca Vizzarro
2024-11-08 17:01   ` [PATCH v3 1/3] dts: fix adjust L2/L3 addresses behavior Luca Vizzarro
2024-11-12 17:11     ` Dean Marx
2024-11-13 15:36     ` Patrick Robb
2024-11-08 17:01   ` [PATCH v3 2/3] dts: allow to get multiple expected packets Luca Vizzarro
2024-11-12 17:16     ` Dean Marx
2024-11-13 15:36     ` Patrick Robb
2024-11-08 17:01   ` [PATCH v3 3/3] dts: add l2fwd test suite Luca Vizzarro
2024-11-13 15:37     ` Patrick Robb [this message]
2024-11-13 16:25 ` [PATCH v4 0/3] " Luca Vizzarro
2024-11-13 16:25   ` [PATCH v4 1/3] dts: allow to get multiple expected packets Luca Vizzarro
2024-11-13 16:25   ` [PATCH v4 1/3] dts: fix adjust L2/L3 addresses behavior Luca Vizzarro
2024-11-13 16:25   ` [PATCH v4 2/3] dts: add l2fwd test suite Luca Vizzarro
2024-11-13 16:25   ` [PATCH v4 2/3] dts: allow to get multiple expected packets Luca Vizzarro
2024-11-13 16:25   ` [PATCH v4 3/3] dts: add l2fwd test suite Luca Vizzarro
2024-11-13 16:25   ` [PATCH v4 3/3] fixup! dts: allow to get multiple expected packets Luca Vizzarro
2024-11-13 16:31 ` [PATCH v5 0/3] dts: add l2fwd test suite Luca Vizzarro
2024-11-13 16:31   ` [PATCH v5 1/3] dts: fix adjust L2/L3 addresses behavior Luca Vizzarro
2024-11-13 16:31   ` [PATCH v5 2/3] dts: allow to get multiple expected packets Luca Vizzarro
2024-11-13 16:31   ` [PATCH v5 3/3] dts: add l2fwd test suite Luca Vizzarro
2024-11-13 19:59     ` Patrick Robb

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='CAJvnSUB5G63dXqTuQxhTrb1E4z9-B=2W8ZRpftiNvaFoZBQY-Q@mail.gmail.com' \
    --to=probb@iol.unh.edu \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=luca.vizzarro@arm.com \
    --cc=paul.szczepanek@arm.com \
    --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).