From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id F3A75AFDD for ; Fri, 20 Jun 2014 04:08:40 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 19 Jun 2014 19:08:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,511,1400050800"; d="scan'208";a="447776731" Received: from fmsmsx108.amr.corp.intel.com ([10.19.9.228]) by azsmga001.ch.intel.com with ESMTP; 19 Jun 2014 19:08:50 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.19.9.28) by FMSMSX108.amr.corp.intel.com (10.19.9.228) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 19 Jun 2014 19:08:48 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX119.amr.corp.intel.com (10.19.9.28) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 19 Jun 2014 19:08:48 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.122]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.81]) with mapi id 14.03.0123.003; Fri, 20 Jun 2014 10:08:47 +0800 From: "Zhang, Helin" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v2] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5 Thread-Index: AQHPi9PWJMAj7V+GyE2+7IYT4FNfSZt5QDQQ Date: Fri, 20 Jun 2014 02:08:47 +0000 Message-ID: References: <1402494218-9203-1-git-send-email-helin.zhang@intel.com> <5971655.KRkzbCMV6h@xps13> In-Reply-To: <5971655.KRkzbCMV6h@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2014 02:08:41 -0000 Hi Thomas No special reason to avoid using '#define'. I think both are OK.=20 But inline function can provide more type checks for the input/output param= eters. Also inline functions with even only one line code can be seen a lot= in that file. So I assume that it is not mandatory to use '#define' instead. Regards, Helin -----Original Message----- From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]=20 Sent: Thursday, June 19, 2014 11:33 PM To: Zhang, Helin Cc: dev@dpdk.org; Neil Horman Subject: Re: [dpdk-dev] [PATCH v2] kni: fix compile errors on Oracle Linux6= .4 and RHEL6.5 2014-06-11 21:43, Helin Zhang: > -#if !(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >=3D=20 > RHEL_RELEASE_VERSION(6,4)) -static inline bool ether_addr_equal(const=20 > u8 *addr1, const u8 *addr2) > +static inline bool __kc_ether_addr_equal(const u8 *addr1, const u8=20 > +*addr2) > { > return !compare_ether_addr(addr1, addr2); } -#endif > +#define ether_addr_equal(_addr1, _addr2)=20 > +__kc_ether_addr_equal((_addr1),(_addr2)) Why not defining it in one line (as Neil suggested)? #define ether_addr_equal(_addr1, _addr2) (!compare_ether_addr(addr1, addr2)= ) -- Thomas