From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 585DBA32A2 for ; Thu, 24 Oct 2019 17:30:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A11461EB43; Thu, 24 Oct 2019 17:30:25 +0200 (CEST) Received: from dispatchb-us1.ppe-hosted.com (dispatchb-us1.ppe-hosted.com [148.163.129.53]) by dpdk.org (Postfix) with ESMTP id 085751EB41 for ; Thu, 24 Oct 2019 17:30:24 +0200 (CEST) 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-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 9A25168007C; Thu, 24 Oct 2019 15:30:21 +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; Thu, 24 Oct 2019 16:30:15 +0100 To: Thomas Monjalon CC: , Ori Kam , Ferruh Yigit , "jingjing.wu@intel.com" , "stephen@networkplumber.org" References: <1569479349-36962-1-git-send-email-orika@mellanox.com> <2066428.hBRGAZJfpI@xps> From: Andrew Rybchenko Message-ID: <30020504-28c6-0872-77e8-a1eb6d6a134c@solarflare.com> Date: Thu, 24 Oct 2019 18:30:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <2066428.hBRGAZJfpI@xps> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit 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-24998.003 X-TM-AS-Result: No-4.017300-8.000000-10 X-TMASE-MatchedRID: 9zTThWtzImvmLzc6AOD8DfHkpkyUphL9BnIRIVcCWN9+SLLtNOiBhp1b YL8THayDnnt2ffmyyM4mWLi5gN9xFvGU4m5A0eV99FQh3flUIh6teS443ymeUWMunwKby/AXUS0 xEYUYNYPx2kyjAgyFJBB4bcz5DWpnpDjB1EOWQBAylU6xjA3vwxlKjo8zguyKOonr6wbCb9v2+6 yv4QHuAeLzNWBegCW2RYvisGWbbS+No+PRbWqfRMZW5ai5WKlylAprRau3UwrshyAhLMe7QLXJ3 4A3wzmzSIX+iO7UE7zuRuq8eoRSvHRwwuoKQzlvkmytdziLibWmZMThgtD2i4gHXXcwyoMIhXIC XPkDTMLvGyaLyWJvBWLqcdF40kDywzhVZiqhieFqbamnjuWv4A== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.017300-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24998.003 X-MDID: 1571931022-CmNPYi1K6Ki2 Subject: Re: [dpdk-dev] [PATCH v5 02/15] ethdev: add support for hairpin queue 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/24/19 6:17 PM, Thomas Monjalon wrote: > 24/10/2019 16:47, Andrew Rybchenko: >> On 10/24/19 11:29 AM, Ori Kam wrote: >>> Hi Andrew, >>> >>> When writing the new function I thought about using bool, but >>> I decided against it for the following reasons: >>> 1. There is no use of bool any where in the code, and there is not special reason to add it now. >> rte_ethdev.c includes stdbool.h and uses bool >> >>> 2. Other functions of this kind already returns int. for example (rte_eth_dev_is_valid_port / rte_eth_is_valid_owner_id) > I agree with Ori here for 2 reasons: > 1. It is better to be consistent in the API > 2. I remember having some issues with some drivers when introducing stdbool in the API. > > I think it may be nice to convert all such API to bool in one patch, > and check if there are some remaining issues with bool usage in drivers or with PPC. > But I suggest to do such API change in DPDK 20.11. OK, no problem. Does it prevent to avoid comparison == 1? Just to avoid changes in these lines in the future.