From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FFFDA0C45; Sun, 4 Jul 2021 22:05:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 133E840686; Sun, 4 Jul 2021 22:05:14 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 5C7C740141 for ; Sun, 4 Jul 2021 22:05:12 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id F2A495C0053; Sun, 4 Jul 2021 16:05:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 04 Jul 2021 16:05:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= 4KLQLmmN1ZaDfg0/vlU6DYqFukF1kXfhyah61H2l8cE=; b=ZcwGjYXY2hI9qN9T 5d6eLMjCX/ZFVQpy/qoqIv5XW2UhGvLWI9tFuMulsrg8w2y7LuzOUSZ/S9qRhUrC uRXPSbT0KOwQzPA0YTfwMGAlFUhBOdJ4fy0nSnB60BnDagbC/tjMoSssG1q5I0SH ZCSgWyVoGhf9tmyoFjjrInn3baBp2dUitOKrFGag+axBozEXY0ubxrjTqEv+MG1y L3f9e8NB8aHzwgusOL9ppaqTrXSx+oz9rDTyIH4TeJWuN9YR4hm+0yFtWlK2j6ak ZyEBO9R/wpJ6/VpGsArCNgDwuc61TBN98bKLKEiHLrie3s+qdzyJTysWp9wuzrLy 7AzCGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=4KLQLmmN1ZaDfg0/vlU6DYqFukF1kXfhyah61H2l8 cE=; b=Th4bgFVf4xostVLMmNYSeYQgt1Mn+3ZAEm0tU6GpLFOl7dTo8ewKQ72u1 oHCkpqVvepIPl+GAlA6sK65lA66DiPwL/Swf+8QIVhUPKdMrIYyI/N68kqloI4Hm 3Lz5H7rZtdK9QdrGR/0vaFxetfZCKClgAxLiPRyLs6vFyaMBymmv+su6QF7WE3kr BqH/5odnY8SXWx2hvyeKwrjScakeK+5o/EWsJMUw1sloTtctBsuydYjhKUdjpHzQ diYzvGy+Lokqi+NUXi0MvAABuW9OphASAmZK+MdYq3+FmM1M77SczOSAb6w4TvcK liDlA6nCRxnzUV9LwFyNjlk0EhMrw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeejvddgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 4 Jul 2021 16:05:10 -0400 (EDT) From: Thomas Monjalon To: Huisong Li Cc: dev@dpdk.org, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru, konstantin.ananyev@intel.com Date: Sun, 04 Jul 2021 22:05:09 +0200 Message-ID: <1644089.D8zZfYZZjn@thomas> In-Reply-To: <1620460836-38506-1-git-send-email-lihuisong@huawei.com> References: <1620460836-38506-1-git-send-email-lihuisong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [RFC] lib/ethdev: add dev configured flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?