From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 0F53F780059; Sun, 24 Feb 2019 17:18:29 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 24 Feb 2019 17:18:24 +0000 To: Thomas Monjalon , Ferruh Yigit CC: References: <20181130002716.27325-1-thomas@monjalon.net> <20190220221051.7928-1-thomas@monjalon.net> <20190220221051.7928-2-thomas@monjalon.net> From: Andrew Rybchenko Message-ID: <099567ad-a7cb-9eec-dd58-e6d0fcee0101@solarflare.com> Date: Sun, 24 Feb 2019 20:18:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190220221051.7928-2-thomas@monjalon.net> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24452.000 X-TM-AS-Result: No-4.683500-8.000000-10 X-TMASE-MatchedRID: zGP2F0O7j/sOwH4pD14DsPHkpkyUphL9QKuv8uQBDjoREeTKxBqIec5e LD+8C2a1T3l0AnIWQ5x9i2E/a+4vEiTyOlFmQwL59Ib/6w+1lWRgp5U7towQcweLCIX046iBSrJ TO1VGhMF2+AZuxakJy89fuxSQqqSyyA1ihY42R28vj6wHfIGxyQhRCJFb9cus5x99q4kVOUh5RA 29TjvO6DU3HPhRrRy9/76CM4Z/MGblRxm3A2wKujl/1fD/GopdcmfM3DjaQLHZs3HUcS/scMtsH VjphDXtPjGlRSozKuDsFMwAwwqlXTedg2rV2Kb5YZS30XOJJIl4m9iftmd3SRp8QurZY6c13H9z KSxLcGRDq84dE2ZJXlc0OnoUOMVF2KbBZ7MbV+gtJrwVySr7PG3HtYk/rgyq3i3uiNS5o4MdC6T O6gQR33puGb8jWxwuHGPJ69mvh0H2+sXgGMniE8CdD3Qub7nx X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.683500-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24452.000 X-MDID: 1551028710-6ZNLMJNPQEbP Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: simplify port state comparisons X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2019 17:18:32 -0000 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