All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Thomas Monjalon <thomas@monjalon.net>, Huisong Li <lihuisong@huawei.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com, konstantin.ananyev@intel.com
Subject: Re: [dpdk-dev] [RFC] lib/ethdev: add dev configured flag
Date: Mon, 5 Jul 2021 12:50:10 +0300	[thread overview]
Message-ID: <e0808841-622b-4473-5962-3581cbb4af42@oktetlabs.ru> (raw)
In-Reply-To: <1640815.0OcVWAD7zg@thomas>

Hi Huisong,

On 7/5/21 9:07 AM, Thomas Monjalon wrote:
> 05/07/2021 05:18, Huisong Li:
>> 在 2021/7/5 4:05, Thomas Monjalon 写道:
>>> 08/05/2021 10:00, Huisong Li:
>>>> Currently, if dev_configure is not invoked or fails to be invoked, users
>>>> can still invoke dev_start successfully. This patch adds a "dev_configured"
>>>> flag in "rte_eth_dev_data" to control whether dev_start can be invoked.
>>> [...]
>>>> --- a/lib/ethdev/rte_ethdev_core.h
>>>> +++ b/lib/ethdev/rte_ethdev_core.h
>>>> @@ -167,7 +167,11 @@ struct rte_eth_dev_data {
>>>>   		scattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */
>>>>   		all_multicast : 1, /**< RX all multicast mode ON(1) / OFF(0). */
>>>>   		dev_started : 1,   /**< Device state: STARTED(1) / STOPPED(0). */
>>>> -		lro         : 1;   /**< RX LRO is ON(1) / OFF(0) */
>>>> +		lro         : 1,  /**< RX LRO is ON(1) / OFF(0) */
>>>> +		dev_configured : 1;
>>>> +		/**< Device configuration state:
>>>> +		 * CONFIGURED(1) / NOT CONFIGURED(0).
>>>> +		 */
>>> Why not using "enum rte_eth_dev_state"?
>>> Because rte_eth_dev.state is not shared between processes?
>>
>> It doesn't feel right. "enum rte_eth_dev_state" is private to the 
>> primary and secondary processes and can be independently controlled.
>>
>> However, the secondary process does not make resource allocations and 
>> does not call dev_configure().
>>
>> These are done by the primary process and  can be obtained or used by 
>> the secondary process.
>>
>> Like "dev_started" in struct rte_eth_dev_data.
> 
> That's a good reason, thanks.
> 

Please, send non-RFC version of the patch with fixed summary
(w/o "lib/") and above reason mentioned in the patch
description as well.

  reply	other threads:[~2021-07-05  9:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  8:00 [dpdk-dev] [RFC] lib/ethdev: add dev configured flag Huisong Li
2021-05-31  8:51 ` Huisong Li
2021-06-14 15:37 ` Andrew Rybchenko
2021-06-29  2:27   ` Huisong Li
2021-07-02 10:08     ` Andrew Rybchenko
2021-07-02 11:57       ` Ferruh Yigit
2021-07-02 13:23         ` Ananyev, Konstantin
2021-07-03  8:35           ` Huisong Li
2021-07-03 11:04             ` Ananyev, Konstantin
2021-07-05  3:03               ` Huisong Li
2021-07-05  9:50                 ` Andrew Rybchenko
2021-07-05 11:22                   ` Ananyev, Konstantin
2021-07-06  1:47                     ` Huisong Li
2021-07-04 20:05 ` Thomas Monjalon
2021-07-05  3:18   ` Huisong Li
2021-07-05  6:07     ` Thomas Monjalon
2021-07-05  9:50       ` Andrew Rybchenko [this message]
2021-07-06  1:48         ` Huisong Li
2021-07-06  3:24 ` [dpdk-dev] [PATCH V1] ethdev: " Huisong Li
2021-07-06  4:10 ` [dpdk-dev] [PATCH V2] " Huisong Li
2021-07-06  8:36   ` Andrew Rybchenko
2021-07-07  2:55     ` Huisong Li
2021-07-07  8:25       ` Andrew Rybchenko
2021-07-07  9:26         ` Huisong Li
2021-07-07  7:39     ` David Marchand
2021-07-07  8:23       ` Andrew Rybchenko
2021-07-07  9:36         ` David Marchand
2021-07-07  9:59           ` Thomas Monjalon
2021-07-07 10:40             ` David Marchand
2021-07-07 10:57               ` Thomas Monjalon
2021-07-06 17:49   ` Ananyev, Konstantin
2021-07-07  9:53 ` [dpdk-dev] [PATCH V3] " Huisong Li
2021-07-08  9:56   ` David Marchand

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=e0808841-622b-4473-5962-3581cbb4af42@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=konstantin.ananyev@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.