DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: David Marchand <david.marchand@redhat.com>, Jie Hai <haijie1@huawei.com>
Cc: dev@dpdk.org, lihuisong@huawei.com,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [PATCH 00/36] fix Rx and Tx queue state
Date: Thu, 28 Sep 2023 13:51:08 +0100	[thread overview]
Message-ID: <41fba429-98c5-4332-b7a3-1da98aacca50@amd.com> (raw)
In-Reply-To: <CAJFAV8zbFY7dfgLr_jY5Keo8Kpw2=NVi99bF5h4A4VYjVrKKtg@mail.gmail.com>

On 9/22/2023 7:41 AM, David Marchand wrote:
> Hello,
> 
> On Fri, Sep 22, 2023 at 4:41 AM Jie Hai <haijie1@huawei.com> wrote:
>> On 2023/9/19 0:54, Ferruh Yigit wrote:
>>> On 9/8/2023 12:50 PM, David Marchand wrote:
>>>> On Fri, Sep 8, 2023 at 1:32 PM Jie Hai <haijie1@huawei.com> wrote:
>>>>>
>>>>> The DPDK framework reports the queue state, which is stored in
>>>>> dev->data->tx_queue_state and dev->data->rx_queue_state. The
>>>>> state is maintained by the driver. Users may determine whether
>>>>> a queue participates in packet forwarding based on the state,
>>>>> for example,
>>>>
>>>> The driver is maintaining this state in dev_start / dev_stop and per
>>>> queue start/stop handlers.
>>>>
>>>>>
>>>>> [1] 5028f207a4fa ("app/testpmd: fix secondary process packet forwarding"
>>>>> [2] 141a520b35f7 ("app/testpmd: fix primary process not polling all queues")
>>>>>
>>>>> Therefore, the drivers need to modify the queue state in time
>>>>> according to the actual situation, especially when dev_start
>>>>> and dev_stop are called. see [3] for more information.
>>>>>
>>>>> [3] https://inbox.dpdk.org/dev/20230721160422.3848154-1-ferruh.yigit@amd.com/
>>>>>
>>>>> This patchset also resubmit the patch [2] and makes some fixes on the patch.
>>>>
>>>> I just had a quick look at some patches and I wonder if a better fix
>>>> would be at the ethdev level, rather than fixing all drivers.
>>>>
>>>>
>>>
>>> I came here to make the same comment,
>>>
>>> Jie, I forgot if we discuss this already but,
>>>
>>> does it work if we update queue state in 'rte_eth_dev_start()' &
>>> 'rte_eth_dev_stop()' when 'dev_start' & 'dev_stop' dev_ops succeeds?
>>>
>>> This solves the case driver forgets to update the queue state.
>>>
>>>
>> Hi, Furrh and David,
>>
>> It's OK for dev_stop, but not enough for dev_start.
>> Some drivers also support deferred_start.
>> Therefore, not all queues are in the start state after dev_start.
>>
>> If we want to get that correct queue state at the framework level, I
>> offer the following options:
>>
>> step 1. A capability(e.g. RTE_ETH_DEV_CAPA_DEFERRED_START) is added to
>> the framework, indicating whether the driver supports deferred_start.
>> The capability should be reported by the driver and user can get it by
>> rte_eth_dev_info_get().
>> step 2. All drivers that support deferred_start should report configuration
>> information about deferred_start through
>> rte_eth_rx_queue_info_get |rte_eth_tx_queue_info_get.
>> step 3.The framework updates the queue status based on the support and
>> configuration of deferred_start.
> 
> rte_eth_dev_start must only update the queue state if
> rx_deferred_start is unset (see struct
> rte_eth_rxconf::rx_deferred_start).
> And the queue state needs to be updated in ethdev
> rte_eth_dev_rx_queue_start/stop.
> 
> So I don't see where we need a new capability.
> 
> 

Hi David,

Problem seems 'rte_eth_rxconf::rx_deferred_start' is not stored in
ethdev level, so rte_eth_dev_start() can't use it.


And although application can request it, via rxconf, it is not clear if
driver supports it or if it will take into account, that is where a
capability flag can be useful, but it is a big change for this patch.


  parent reply	other threads:[~2023-09-28 12:51 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 11:28 Jie Hai
2023-09-08 11:28 ` [PATCH 01/36] net/axgbe: " Jie Hai
2023-09-08 11:28 ` [PATCH 02/36] net/af_packet: " Jie Hai
2023-09-08 11:28 ` [PATCH 03/36] net/af_xdp: " Jie Hai
2023-09-08 11:28 ` [PATCH 04/36] net/avp: " Jie Hai
2023-09-08 11:28 ` [PATCH 05/36] net/bnx2x: " Jie Hai
2023-09-08 11:28 ` [PATCH 06/36] net/bnxt: " Jie Hai
2023-09-08 11:28 ` [PATCH 07/36] net/bonding: " Jie Hai
2023-09-08 11:28 ` [PATCH 08/36] net/cxgbe: " Jie Hai
2023-09-08 11:28 ` [PATCH 09/36] net/dpaa: " Jie Hai
2023-09-16 10:07   ` Hemant Agrawal
2023-09-08 11:28 ` [PATCH 10/36] net/dpaa2: " Jie Hai
2023-09-16 10:07   ` Hemant Agrawal
2023-09-08 11:28 ` [PATCH 11/36] net/e1000: " Jie Hai
2023-09-08 11:28 ` [PATCH 12/36] net/ena: " Jie Hai
2023-09-08 11:28 ` [PATCH 13/36] net/enetc: " Jie Hai
2023-09-08 11:28 ` [PATCH 14/36] net/enic: " Jie Hai
2023-09-08 11:28 ` [PATCH 15/36] net/hinic: " Jie Hai
2023-09-08 11:28 ` [PATCH 16/36] net/ipn3ke: " Jie Hai
2023-09-10  2:56   ` Xu, Rosen
2023-09-08 11:28 ` [PATCH 17/36] net/memif: " Jie Hai
2023-09-08 11:28 ` [PATCH 18/36] net/mana: " Jie Hai
2023-09-08 11:28 ` [PATCH 19/36] net/mlx4: " Jie Hai
2023-09-08 11:28 ` [PATCH 20/36] net/mvneta: " Jie Hai
2023-09-08 11:28 ` [PATCH 21/36] net/mvpp2: " Jie Hai
2023-09-08 11:28 ` [PATCH 22/36] net/netvsc: " Jie Hai
2023-09-08 11:28 ` [PATCH 23/36] net/nfp: " Jie Hai
2023-09-11  1:45   ` Chaoyong He
2023-09-08 11:28 ` [PATCH 24/36] net/ngbe: " Jie Hai
2023-09-08 11:28 ` [PATCH 25/36] net/null: " Jie Hai
2023-09-08 11:28 ` [PATCH 26/36] net/octeon_ep: " Jie Hai
2023-09-08 11:28 ` [PATCH 27/36] net/octeontx: " Jie Hai
2023-11-02  9:59   ` [EXT] " Harman Kalra
2023-11-02 12:34     ` Jie Hai
2023-09-08 11:28 ` [PATCH 28/36] net/pfe: " Jie Hai
2023-09-08 11:28 ` [PATCH 29/36] net/ring: " Jie Hai
2023-09-08 11:28 ` [PATCH 30/36] net/sfc: " Jie Hai
2023-09-08 12:01   ` Andrew Rybchenko
2023-09-12  2:39     ` Jie Hai
2023-09-08 11:28 ` [PATCH 31/36] net/softnic: " Jie Hai
2023-09-18 11:24   ` Dumitrescu, Cristian
2023-09-08 11:28 ` [PATCH 32/36] net/txgbe: " Jie Hai
2023-09-08 11:28 ` [PATCH 33/36] net/vhost: " Jie Hai
2023-09-08 11:28 ` [PATCH 34/36] net/virtio: " Jie Hai
2023-09-08 11:29 ` [PATCH 35/36] net/vmxnet3: " Jie Hai
2023-09-08 11:29 ` [PATCH 36/36] app/testpmd: fix primary process not polling all queues Jie Hai
2023-09-08 11:50 ` [PATCH 00/36] fix Rx and Tx queue state David Marchand
2023-09-18 16:54   ` Ferruh Yigit
2023-09-22  2:41     ` Jie Hai
2023-09-22  6:41       ` David Marchand
2023-09-26 13:59         ` Jie Hai
2023-09-28 12:51         ` Ferruh Yigit [this message]
2023-09-28  7:42 ` [PATCH v2 0/8] " Jie Hai
2023-09-28  7:42   ` [PATCH v2 1/8] lib/ethdev: update Rx and Tx queue status Jie Hai
2023-09-28  9:24     ` lihuisong (C)
2023-09-28 13:15     ` Ferruh Yigit
2023-10-07  8:36       ` Jie Hai
2023-10-16 11:23         ` Ferruh Yigit
2023-09-28  7:42   ` [PATCH v2 2/8] net/cpfl: support getting queue information Jie Hai
2023-10-01 16:04     ` Ali Alnubani
2023-09-28  7:43   ` [PATCH v2 3/8] net/enetc: save deferred start configuratin for queues Jie Hai
2023-09-28  7:43   ` [PATCH v2 4/8] net/enetc: support getting queue information Jie Hai
2023-09-28  7:43   ` [PATCH v2 5/8] net/failsafe: " Jie Hai
2023-09-28  7:43   ` [PATCH v2 6/8] net/fm10k: " Jie Hai
2023-09-28  7:43   ` [PATCH v2 7/8] net/idpf: " Jie Hai
2023-09-28  7:43   ` [PATCH v2 8/8] app/testpmd: fix primary process not polling all queues Jie Hai
2023-10-01 16:08   ` [PATCH v2 0/8] fix Rx and Tx queue state Ali Alnubani
2023-10-16 11:51 ` [PATCH 00/36] " Ferruh Yigit
2023-10-16 12:01   ` Ferruh Yigit
2023-10-17 14:11   ` Thomas Monjalon

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=41fba429-98c5-4332-b7a3-1da98aacca50@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=haijie1@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=thomas@monjalon.net \
    /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).