DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Jie Hai <haijie1@huawei.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Matan Azrad <matan@nvidia.com>
Cc: dev@dpdk.org, liudongdong3@huawei.com
Subject: Re: [PATCH v3] app/test-pmd: fix not polling all queues without deferred starting
Date: Wed, 7 Jun 2023 18:38:12 +0100	[thread overview]
Message-ID: <59b7dff5-a08f-0b55-02a4-048ef7056985@amd.com> (raw)
In-Reply-To: <8732b6d3-45fd-21a9-4231-08526d6bd9bd@huawei.com>

On 6/7/2023 8:04 AM, Jie Hai wrote:
> On 2023/6/6 22:45, Ferruh Yigit wrote:
>> On 5/29/2023 3:26 AM, Jie Hai wrote:
>>
>>>
>>> Each stream has a read-only "disabled" field that control if this
>>> stream should be used to forward. This field depends on states
>>> of Rx/Tx queues, please see
>>> commit 3c4426db54fc ("app/testpmd: do not poll stopped queues").
>>>
>>> Currently, the testpmd and DPDK frameworks maintain queue state
>>> separately. That of the primary process of testpmd are set by
>>> deferred_start in the queue configuration. And that of the
>>> framework(dev->data->rx_queue_state or dev->data->tx_queue_state)
>>> is set when the driver enables/disables the queue, and it is
>>> shared between the primary/secondary process.
>>>
>>> If the deferred_start is set, the queue is disabled and the
>>> corresponding queue state in the framework changes to stopped.
>>> However, the queue state in the framework does not only come from
>>> this. If the primary/secondary process stops a queue, the related
>>> queue state will change, too. However, the primary process of
>>> testpmd does not know the change brought by this operation.
>>> Therefore, setting the queue state in the primary testpmd by only
>>> the deferred_start is unsafe.
>>>
>>> For example, Rx/Tx queues who are stopped before the operations of
>>> stopping and starting port cannot forward packets after these
>>> operations on primary process.
>>>
>>> Therefore, the primary process should getting the queue state from
>>> of the framework as the secondary process does, please see commit
>>> e065c9aa3e05 ("app/testpmd: fix secondary process packet forwarding").
>>>
>>> Fixes: 3c4426db54fc ("app/testpmd: do not poll stopped queues")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Jie Hai <haijie1@huawei.com>
>>> ---
>>> v1->v2:
>>> 1. Fix misspelled word 'deferred'.
>>> 2. Fix incorrect format of reference to commits.
>>>
>>> v2->v3
>>> 1. Fix incorrect format of reference to commits.
>>
>>
>> Hi Jie,
>>
>> Problem is not clear for me.
>> Can you please describe more what is not working?
>>
>> .
> Hi Ferruh,
> 
> Thanks for your question.
> 
> Here's an example.
> step1: Start the app.
>      dpdk-testpmd -a 0000:35:00.0 --file-prefix=test --proc-type=auto -l
> 0-3 -- -i --rxq=10 --txq=10
> 
> step2: Perform the following steps and send traffic. As expected, queue
> 7 does not send or receive packets, and other queues can send or receive
> packets.
>     port 0 rxq 7 stop
>     port 0 txq 7 stop
>     set fwd mac
>     start
> 
> step3: Perform the following steps and send traffic. All queues are
> expected to send and receive packets normally, but that's not the case
> for queue 7.
>     stop
>     port stop all
>     port start all
>     start
>     show port xstats all
> In fact, only the value of rx_q7_packets for queue 7 is not zero, which
> means queue 7 is enabled for the driver but is not involved in packet
> receiving and forwarding by software. If we check queue state by command
> 'show rxq info 0 7' and 'show txq info 0 7', we see queue 7 is started
> as other queues are.
>     Rx queue state: started
>     Tx queue state: started
> The queue 7 is started but cannot forward. That's the problem.
> 

Thanks for details, I confirm that problem is valid.
This problem is hard to explain, perhaps it is easier to put above
explanation in the commit log.

Let me check the patch with above explanation.


  reply	other threads:[~2023-06-07 17:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06  9:26 [PATCH] app/test-pmd: fix not polling all queues without defered starting Jie Hai
2023-05-08  3:10 ` [PATCH v2] app/test-pmd: fix not polling all queues without deferred starting Jie Hai
2023-05-29  2:26   ` [PATCH v3] " Jie Hai
2023-06-06 14:45     ` Ferruh Yigit
2023-06-07  7:04       ` Jie Hai
2023-06-07 17:38         ` Ferruh Yigit [this message]
2023-06-07 18:12     ` Ferruh Yigit
2023-06-09  8:54       ` Jie Hai
2023-06-09  9:03     ` [PATCH v4] app/testpmd: fix primary process not polling all queues Jie Hai
2023-06-09 11:10       ` Ferruh Yigit
2023-06-20 10:07         ` Jie Hai
2023-06-20 10:57           ` Ferruh Yigit
2023-06-20 17:05           ` Ferruh Yigit
2023-06-22 16:40       ` Ali Alnubani
2023-06-26  9:30         ` Jie Hai
2023-06-27 11:05           ` Ferruh Yigit
2023-07-03 13:40             ` Ali Alnubani

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=59b7dff5-a08f-0b55-02a4-048ef7056985@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=aman.deep.singh@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=haijie1@huawei.com \
    --cc=liudongdong3@huawei.com \
    --cc=matan@nvidia.com \
    --cc=yuying.zhang@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).