From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v2 1/4] ethdev: simplify port state comparisons Date: Sun, 24 Feb 2019 20:18:21 +0300 Message-ID: <099567ad-a7cb-9eec-dd58-e6d0fcee0101@solarflare.com> References: <20181130002716.27325-1-thomas@monjalon.net> <20190220221051.7928-1-thomas@monjalon.net> <20190220221051.7928-2-thomas@monjalon.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: To: Thomas Monjalon , Ferruh Yigit Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id DBDFF201 for ; Sun, 24 Feb 2019 18:18:31 +0100 (CET) In-Reply-To: <20190220221051.7928-2-thomas@monjalon.net> Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2/21/19 1:10 AM, Thomas Monjalon wrote: > There are three states for an ethdev port. > Checking that the port is unused looks simpler than > checking it is neither attached nor removed. > > Signed-off-by: Thomas Monjalon It is not always equivalent (if/when more states added), but I think comparison to RTE_ETH_DEV_UNUSED is really better here. Reviewed-by: Andrew Rybchenko