DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
	Jie Hai <haijie1@huawei.com>, Song Jiale <songx.jiale@intel.com>,
	Yuan Peng <yuan.peng@intel.com>,
	Raslan Darawsheh <rasland@nvidia.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Ivan Malov <ivan.malov@arknetworks.am>,
	Huisong Li <lihuisong@huawei.com>
Subject: Re: [PATCH v2] ethdev: clarify device queue state after start and stop
Date: Mon, 16 Oct 2023 16:52:59 +0100	[thread overview]
Message-ID: <b554e20d-4a16-4ac2-8d93-99a54725c18e@amd.com> (raw)
In-Reply-To: <3675930.RUnXabflUD@thomas>

On 10/16/2023 3:59 PM, Thomas Monjalon wrote:
> 13/10/2023 17:57, Ferruh Yigit:
>> Drivers start/stop device queues on port start/stop, but not all drivers
>> update queue state accordingly.
>>
>> This becomes more visible if a specific queue stopped explicitly and
>> port stopped/started later, in this case although all queues are
>> started, the state of that specific queue is stopped and it is
>> misleading.
>>
>> Misrepresentation of queue state became a defect with commit [1] that
>> does forwarding decision based on queue state and commit [2] that gets
>> up to date queue state from ethdev/device before forwarding.
>>
>> [1]
>> commit 3c4426db54fc ("app/testpmd: do not poll stopped queues")
>>
>> [2]
>> commit 5028f207a4fa ("app/testpmd: fix secondary process packet forwarding")
>>
>> This patch documents that status of all queues of a device should be
>> `RTE_ETH_QUEUE_STATE_STOPPED` after port stop and their status should
>> be`RTE_ETH_QUEUE_STATE_STARTED` after port start.
> 
> It is so basic that it may look stupid :)
> Yes we still have to enforce such basic things, thank you for this work.
> 
>> +REGISTER_TEST_COMMAND(ethdev_api, test_ethdev_api);
> 
> Maybe add a comment here to explain it is not part of basic suites,
> waiting for all drivers being compliant.
> 

Following comment added while merging:

 /* TODO: Make part of the fast test suite, `REGISTER_FAST_TEST()`,
  *       when all drivers complies to the queue state requirement
  */


>> + * All device queues (except form deferred start queues) status should be
>> + * `RTE_ETH_QUEUE_STATE_STARTED` after start.
>> + *
>>   * On success, all basic functions exported by the Ethernet API (link status,
>>   * receive/transmit, and so on) can be invoked.
>>   *
>> @@ -2828,6 +2831,8 @@ int rte_eth_dev_start(uint16_t port_id);
>>   * Stop an Ethernet device. The device can be restarted with a call to
>>   * rte_eth_dev_start()
>>   *
>> + * All device queues status should be `RTE_ETH_QUEUE_STATE_STOPPED` after stop.
>> + *
> 
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
> 
> 

Applied to dpdk-next-net/main, thanks.

      parent reply	other threads:[~2023-10-16 15:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 16:04 [RFC] " Ferruh Yigit
2023-07-21 17:33 ` Ivan Malov
2023-07-21 22:57   ` Ferruh Yigit
2023-07-21 17:42 ` Ivan Malov
2023-07-21 22:58   ` Ferruh Yigit
2023-07-24  1:43 ` lihuisong (C)
2023-09-28 19:30   ` Ferruh Yigit
2023-09-28 20:59 ` [PATCH] " Ferruh Yigit
2023-10-12  9:33   ` David Marchand
2023-10-13 11:36     ` Ferruh Yigit
2023-10-13 15:57   ` [PATCH v2] " Ferruh Yigit
2023-10-16 14:59     ` Thomas Monjalon
2023-10-16 15:12       ` Ferruh Yigit
2023-10-16 15:52       ` Ferruh Yigit [this message]

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=b554e20d-4a16-4ac2-8d93-99a54725c18e@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=haijie1@huawei.com \
    --cc=ivan.malov@arknetworks.am \
    --cc=lihuisong@huawei.com \
    --cc=qiming.yang@intel.com \
    --cc=rasland@nvidia.com \
    --cc=songx.jiale@intel.com \
    --cc=thomas@monjalon.net \
    --cc=yuan.peng@intel.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).