From: Patrick Robb <probb@iol.unh.edu>
To: Dean Marx <dmarx@iol.unh.edu>
Cc: npratte@iol.unh.edu, luca.vizzarro@arm.com,
yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com,
paul.szczepanek@arm.com, dev@dpdk.org,
Jeremy Spewock <jspewock@iol.unh.edu>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH v14] dts: port over queue start/stop suite
Date: Sun, 12 Jan 2025 23:38:01 -0500 [thread overview]
Message-ID: <CAJvnSUAsuxmpZ3NWzLU8GRC1ZG-iqOCvS-zRC517s0Li=ZtYjQ@mail.gmail.com> (raw)
In-Reply-To: <20250106203747.22489-1-dmarx@iol.unh.edu>
[-- Attachment #1: Type: text/plain, Size: 5515 bytes --]
On Mon, Jan 6, 2025 at 2:36 PM Dean Marx <dmarx@iol.unh.edu> wrote:
>
> + @func_test
> + def test_rx_queue_deferred_start(self) -> None:
> + """Rx queue deferred start stop test.
> +
> + Steps:
> + Launch testpmd, enable deferred start on Rx queue 0 port 0.
> + Stop Rx queue 0 on port 0.
> + Verify:
> + Send a packet on port 0, ensure it is not received.
> + """
> + with TestPmdShell(node=self.sut_node) as testpmd:
> + testpmd.set_forward_mode(SimpleForwardingModes.mac)
> + testpmd.stop_all_ports()
> + testpmd.set_queue_deferred_start(0, 0, True, True)
> + testpmd.start_all_ports()
> + testpmd.stop_port_queue(0, 0, True)
> + testpmd.start()
> + self.send_packet_and_verify(should_receive=False)
> + stats = testpmd.show_port_stats(port_id=0)
> + self.verify(
> + stats.rx_packets == 0,
> + "Packets were received on Rx queue while deferred start
> was enabled",
> + )
>
To me this does not read like it is properly validating deferred_start, so
I want to double check this before we merge.
From the link below, "All device queues (except form deferred start queues)
status should be RTE_ETH_QUEUE_STATE_STARTED after start."
https://doc.dpdk.org/api/rte__ethdev_8h.html#afdc834c1c52e9fb512301990468ca7c2
So, I assume that we want to validate:
1. When deferred_start is set for a queue, the queue does not erroneously
start on testpmd.start()
2. You can successfully start the queue after the DPDK application is
started and send packets.
In order to do this. I would write the testcase like:
with TestPmdShell(node=self.sut_node) as testpmd:
testpmd.set_forward_mode(SimpleForwardingModes.mac)
testpmd.stop_all_ports()
testpmd.set_queue_deferred_start(0, 0, True, True)
testpmd.start()
self.send_packet_and_verify(should_receive=False)
testpmd.start_port_queue(0, 0, True)
self.send_packet_and_verify(should_receive=True)
What do you think?
+
> + @func_test
> + def test_tx_queue_deferred_start(self) -> None:
> + """Tx queue start stop test.
> +
> + Steps:
> + Launch testpmd, enable deferred start on Tx queue 0 port 0.
> + Stop Tx queue 0 on port 0.
> + Verify:
> + Send a packet on port 0, ensure it is not forwarded.
> + """
> + with TestPmdShell(node=self.sut_node) as testpmd:
> + testpmd.set_forward_mode(SimpleForwardingModes.mac)
> + testpmd.stop_all_ports()
> + testpmd.set_queue_deferred_start(0, 0, False, True)
> + testpmd.start_all_ports()
> + testpmd.stop_port_queue(1, 0, False)
> + testpmd.start()
> + self.send_packet_and_verify(should_receive=False)
+ stats = testpmd.show_port_stats(port_id=1)
> + self.verify(
> + stats.tx_packets == 0,
> + "Packets were forwarded on Tx queue while deferred start
> was enabled",
> + )
>
Thanks Dean. This mostly looks good to me, but I have a couple
questions/comments.
1. I see that you are calling self.verify() twice per testsuite, once
through send_packet_and_verify(), and once by collecting testpmd port
stats. So, we basically have two means of verifying that the ports are
behaving as expected. But, are they essentially verifying the same thing,
and are thus overlapping in responsibilities? If this is the case then we
may be adding complexity for no gain.
Taking the test_tx_queue_deferred_start testcase as an example, instead of
using send_packet_and_verify(), can you just, directly in the testcase:
packet = Ether() / IP() / Raw(load="xxxxx")
self.send_packet_and_capture(packet)
And then check port stats, with that being the sole testcase assertion? Or,
we can do the opposite and drop the port stats assertion, and rely solely
on send_packet_and_capture() and reading the RAW layer, which seems equally
as good. Anyhow perhaps there is some added value from doing both
assertions, and I realize they did that in the legacy DTS testcase, but I
figured I'd ask for your thoughts. Let me know if you agree/disagree.
2. The way the testcase was written in the legacy framework involved
stopping the tx queue, sending a packet, asserting none was received on
that port, then restarting the queue, then sending a packet and asserting
it is received on the queue. You are not doing the second half of this
process in your testcases - is there a reason why not? Do you think it
would be good to add this? See this blurb from the old test plan:
#. Run "port 0 txq 0 stop" to stop txq 0 in port 0
#. Start packet generator to transmit and check tester port not receive
packets
and in testpmd it not has "port 0/queue 0: received 1 packets" print
#. Run "port 0 txq 0 start" to start txq 0 in port 0
#. Start packet generator to transmit and check tester port receive packets
and in testpmd it has "port 0/queue 0: received 1 packets" print
I will be working remotely tomorrow as I have covid, but we can do a video
conference if you think it beneficial. I would like to merge this tomorrow
once we resolve these questions and submit a new version (if needed).
Thanks!
[-- Attachment #2: Type: text/html, Size: 7102 bytes --]
next prev parent reply other threads:[~2025-01-13 4:40 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 19:46 [PATCH v2 0/3] dts: " Dean Marx
2024-06-17 19:46 ` [PATCH v2 1/3] dts: initial queue start/stop suite implementation Dean Marx
2024-06-21 21:27 ` Jeremy Spewock
2024-06-17 19:46 ` [PATCH v2 2/3] dts: added promisc/verbose func to testpmd shell Dean Marx
2024-06-21 21:28 ` Jeremy Spewock
2024-06-17 19:46 ` [PATCH v2 3/3] dts: queue suite conf schema Dean Marx
2024-06-21 21:28 ` Jeremy Spewock
2024-06-21 21:27 ` [PATCH v2 0/3] dts: queue start/stop suite Jeremy Spewock
2024-06-26 13:51 ` [PATCH v3 1/3] dts: initial queue start/stop suite implementation Dean Marx
2024-06-26 13:51 ` [PATCH v3 2/3] dts: add functions to testpmd shell Dean Marx
2024-06-26 19:51 ` Jeremy Spewock
2024-06-26 13:51 ` [PATCH v3 3/3] dts: queue suite conf schema Dean Marx
2024-06-26 19:51 ` Jeremy Spewock
2024-06-26 19:50 ` [PATCH v3 1/3] dts: initial queue start/stop suite implementation Jeremy Spewock
2024-06-28 16:19 ` [PATCH v4 1/3] dts: add functions to testpmd shell Dean Marx
2024-06-28 16:19 ` [PATCH v4 2/3] dts: initial queue start/stop suite implementation Dean Marx
2024-07-01 20:17 ` Jeremy Spewock
2024-06-28 16:19 ` [PATCH v4 3/3] dts: queue suite conf schema Dean Marx
2024-07-01 20:17 ` [PATCH v4 1/3] dts: add functions to testpmd shell Jeremy Spewock
2024-07-03 18:08 ` [PATCH v5 " Dean Marx
2024-07-03 18:08 ` [PATCH v5 2/3] dts: initial queue start/stop suite implementation Dean Marx
2024-07-10 15:36 ` Jeremy Spewock
2024-07-03 18:08 ` [PATCH v5 3/3] dts: queue suite conf schema Dean Marx
2024-07-10 15:37 ` Jeremy Spewock
2024-07-10 15:36 ` [PATCH v5 1/3] dts: add functions to testpmd shell Jeremy Spewock
2024-07-10 16:01 ` [PATCH v6 " Dean Marx
2024-07-10 16:01 ` [PATCH v6 2/3] dts: initial queue start/stop suite implementation Dean Marx
2024-07-11 13:58 ` Jeremy Spewock
2024-07-10 16:01 ` [PATCH v6 3/3] dts: queue suite conf schema Dean Marx
2024-07-11 13:59 ` [PATCH v6 1/3] dts: add functions to testpmd shell Jeremy Spewock
2024-07-17 20:23 ` [PATCH v7 " Dean Marx
2024-07-17 20:23 ` [PATCH v7 2/3] dts: initial queue start/stop suite implementation Dean Marx
2024-07-19 13:34 ` Jeremy Spewock
2024-07-23 17:04 ` Adam Hassick
2024-07-17 20:23 ` [PATCH v7 3/3] dts: queue suite conf schema Dean Marx
2024-07-19 13:34 ` Jeremy Spewock
2024-07-19 13:34 ` [PATCH v7 1/3] dts: add functions to testpmd shell Jeremy Spewock
2024-07-24 18:32 ` [PATCH v8 0/3] dts: refactored queue start/stop suite Dean Marx
2024-07-24 18:32 ` [PATCH v8 1/3] dts: add functions to testpmd shell Dean Marx
2024-07-26 19:19 ` Jeremy Spewock
2024-07-24 18:32 ` [PATCH v8 2/3] dts: initial queue start/stop suite implementation Dean Marx
2024-07-26 19:19 ` Jeremy Spewock
2024-07-24 18:32 ` [PATCH v8 3/3] dts: queue suite conf schema Dean Marx
2024-07-26 19:19 ` Jeremy Spewock
2024-08-07 19:36 ` [PATCH v9 0/2] dts: refactored queue start/stop suite Dean Marx
2024-08-07 19:36 ` [PATCH v9 1/2] dts: add functions to testpmd shell Dean Marx
2024-08-09 15:51 ` Jeremy Spewock
2024-08-07 19:36 ` [PATCH v9 2/2] dts: initial queue start/stop suite implementation Dean Marx
2024-08-09 15:52 ` Jeremy Spewock
2024-10-08 21:48 ` [PATCH v10 0/1] dts: port over queue start/stop suite Dean Marx
2024-10-08 21:48 ` [PATCH v10] " Dean Marx
2024-11-18 19:59 ` [PATCH v11] " Dean Marx
2024-12-17 23:08 ` [PATCH v12] " Dean Marx
2024-12-18 3:05 ` Stephen Hemminger
2024-12-23 18:39 ` [PATCH v13] " Dean Marx
2025-01-06 20:37 ` [PATCH v14] " Dean Marx
2025-01-13 4:38 ` Patrick Robb [this message]
2025-01-13 17:00 ` Dean Marx
2025-01-13 20:07 ` [PATCH v15] " 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='CAJvnSUAsuxmpZ3NWzLU8GRC1ZG-iqOCvS-zRC517s0Li=ZtYjQ@mail.gmail.com' \
--to=probb@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=jspewock@iol.unh.edu \
--cc=luca.vizzarro@arm.com \
--cc=npratte@iol.unh.edu \
--cc=paul.szczepanek@arm.com \
--cc=stephen@networkplumber.org \
--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).