DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dean Marx <dmarx@iol.unh.edu>
To: Patrick Robb <probb@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: Mon, 13 Jan 2025 12:00:56 -0500	[thread overview]
Message-ID: <CABD7UXMPdssU7uyDHXJXtkOdXP82ffGGXUS=xaQ=J=q-Veq6MQ@mail.gmail.com> (raw)
In-Reply-To: <CAJvnSUAsuxmpZ3NWzLU8GRC1ZG-iqOCvS-zRC517s0Li=ZtYjQ@mail.gmail.com>

> 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?

I see what you're saying, I can modify the deferred start cases to add
this functionality.

> 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.

Yes I agree, I was mostly just doing it since the legacy DTS suite did
it like you mentioned. I'd be fine with removing the stats check
portion though, and just checking whether testpmd receives/doesn't
receive the packet.

> 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 honestly don't remember why I took that out, I can definitely add
that back it seems like it would be useful. I'll send out a new
version ASAP so it's ready to merge by tomorrow, thanks Patrick.

  reply	other threads:[~2025-01-13 17:01 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
2025-01-13 17:00                   ` Dean Marx [this message]
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='CABD7UXMPdssU7uyDHXJXtkOdXP82ffGGXUS=xaQ=J=q-Veq6MQ@mail.gmail.com' \
    --to=dmarx@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=jspewock@iol.unh.edu \
    --cc=luca.vizzarro@arm.com \
    --cc=npratte@iol.unh.edu \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --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).