From: Patrick Robb <probb@iol.unh.edu>
To: Dean Marx <dmarx@iol.unh.edu>
Cc: luca.vizzarro@arm.com, yoan.picchi@foss.arm.com,
Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com,
dev@dpdk.org
Subject: Re: [PATCH v2 2/3] dts: add jump and priority tests to flow suite
Date: Wed, 25 Jun 2025 13:25:03 -0400 [thread overview]
Message-ID: <CAJvnSUB27wVvV-2YW1xVH6nniDRAC9whTPvKTinRJFeJAOgqfw@mail.gmail.com> (raw)
In-Reply-To: <20250521192629.294265-2-dmarx@iol.unh.edu>
[-- Attachment #1: Type: text/plain, Size: 4958 bytes --]
On Wed, May 21, 2025 at 3:26 PM Dean Marx <dmarx@iol.unh.edu> wrote:
> Add jump action verification method and test case to Flow API test suite,
> as well as a case for validating flows with different priority levels.
>
> Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
> ---
> dts/tests/TestSuite_flow.py | 187 +++++++++++++++++++++++++++++++-----
> 1 file changed, 165 insertions(+), 22 deletions(-)
>
> diff --git a/dts/tests/TestSuite_flow.py b/dts/tests/TestSuite_flow.py
> index 15566205c9..06bd3bedc5 100644
> --- a/dts/tests/TestSuite_flow.py
> +++ b/dts/tests/TestSuite_flow.py
> @@ -29,7 +29,7 @@
> class TestFlow(TestSuite):
> """RTE Flow test suite.
>
>
> +
> + @func_test
> + def test_jump_action(self) -> None:
> + """Validate flow rules with different group levels and jump
> actions.
> +
> + Steps:
> + Create a list of packets to test, with a corresponding flow
> list.
> + Launch testpmd with the necessary configuration.
> + Create each flow rule in testpmd.
> + Send each packet in the list, check Rx queue ID.
> +
> + Verify:
> + Check that each packet is received on the appropriate Rx
> queue.
> + """
> + packet_list = [Ether() / IP(), Ether() / IP() / TCP(), Ether() /
> IP() / UDP()]
> + flow_list = [
> + FlowRule(direction="ingress", group_id=0, pattern=["eth"],
> actions=["jump group 1"]),
> + FlowRule(direction="ingress", group_id=0, pattern=["ipv4"],
> actions=["jump group 2"]),
> + FlowRule(
> + direction="ingress", group_id=0, pattern=["eth / ipv4"],
> actions=["queue index 1"]
> + ),
> + FlowRule(
> + direction="ingress",
> + group_id=0,
> + pattern=["eth / ipv4 / tcp"],
> + actions=["queue index 2"],
> + ),
> + FlowRule(
> + direction="ingress",
> + group_id=0,
> + pattern=["eth / ipv4 / udp"],
> + actions=["queue index 3"],
> + ),
> + ]
> + expected_queue_list = [1, 2, 3]
> + with TestPmdShell(rx_queues=4, tx_queues=4) as testpmd:
> + self.send_packet_and_verify_jump(
> + packets=packet_list,
> + flow_rules=flow_list,
> + test_queues=expected_queue_list,
> + testpmd=testpmd,
> + )
>
It looks like the 2nd and 3rd flow rule need to be added to group_id 1 and
2 respectively, instead of 0 and 0, in order for the jumps to groups 1 and
2 to have the desired effect you are validating on.
> +
> + @func_test
> + def test_priority_attribute(self) -> None:
> + """Validate flow rules with queue actions and ethernet patterns.
> +
> + Steps:
> + Create a list of packets to test, with a corresponding flow
> list.
> + Launch testpmd.
> + Create first flow rule in flow list.
> + Send first packet in packet list, capture verbose output.
> + Delete flow rule, repeat for all flows/packets.
> +
> + Verify:
> + Check that each packet is received on the appropriate queue.
> + """
> + test_packet = Ether() / IP() / Raw()
> + flow_list = [
> + FlowRule(
> + direction="ingress",
> + priority_level=3,
> + pattern=["eth / ipv4"],
> + actions=["queue index 1"],
> + ),
> + FlowRule(
> + direction="ingress",
> + priority_level=2,
> + pattern=["eth / ipv4"],
> + actions=["queue index 2"],
> + ),
> + FlowRule(
> + direction="ingress",
> + priority_level=1,
> + pattern=["eth / ipv4"],
> + actions=["queue index 3"],
> + ),
> + ]
> + expected_queue_list = [1, 2, 3]
> + with TestPmdShell(rx_queues=4, tx_queues=4) as testpmd:
> + testpmd.set_verbose(level=1)
> + for flow, expected_queue in zip(flow_list,
> expected_queue_list):
> + testpmd.flow_create(flow_rule=flow, port_id=0)
> + testpmd.start()
> + self.send_packet_and_capture(test_packet)
> + verbose_output =
> testpmd.extract_verbose_output(testpmd.stop())
> + received = False
> + for testpmd_packet in verbose_output:
> + if testpmd_packet.queue_id == expected_queue:
> + received = True
> + self.verify(received, f"Packet was not received on queue
> {expected_queue}")
> --
> 2.49.0
>
Reviewed-by: Patrick Robb <probb@iol.unh.edu>
[-- Attachment #2: Type: text/html, Size: 6639 bytes --]
next prev parent reply other threads:[~2025-06-25 17:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 16:38 [RFC PATCH 0/1] rte flow test suite Dean Marx
2025-05-15 16:38 ` [RFC PATCH] dts: add " Dean Marx
2025-05-19 18:19 ` [PATCH v1 1/2] " Dean Marx
2025-05-19 18:19 ` [PATCH v1 2/2] dts: add jump and priority tests to flow suite Dean Marx
2025-05-21 19:26 ` [PATCH v2 1/3] dts: add rte flow test suite Dean Marx
2025-05-21 19:26 ` [PATCH v2 2/3] dts: add jump and priority tests to flow suite Dean Marx
2025-06-25 17:25 ` Patrick Robb [this message]
2025-05-21 19:26 ` [PATCH v2 3/3] dts: add flow validation Dean Marx
2025-06-25 17:38 ` Patrick Robb
2025-06-26 19:56 ` [PATCH v3 1/2] dts: add rte flow test suite Dean Marx
2025-06-26 19:56 ` [PATCH v3 2/2] dts: add flow validation Dean Marx
2025-06-27 4:29 ` Patrick Robb
2025-06-27 4:29 ` [PATCH v3 1/2] dts: add rte flow test suite Patrick Robb
2025-06-27 14:20 ` Patrick Robb
2025-06-27 14:46 ` Patrick Robb
2025-06-25 17:15 ` [PATCH v2 1/3] " 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=CAJvnSUB27wVvV-2YW1xVH6nniDRAC9whTPvKTinRJFeJAOgqfw@mail.gmail.com \
--to=probb@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=luca.vizzarro@arm.com \
--cc=paul.szczepanek@arm.com \
--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).