From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3916CC358 for ; Mon, 20 Jul 2015 04:08:21 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 19 Jul 2015 19:08:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,505,1432623600"; d="scan'208";a="731828048" Received: from shwdeisgchi017.ccr.corp.intel.com (HELO [10.239.66.47]) ([10.239.66.47]) by orsmga001.jf.intel.com with ESMTP; 19 Jul 2015 19:08:19 -0700 Message-ID: <55AC5812.6000004@intel.com> Date: Mon, 20 Jul 2015 10:08:18 +0800 From: "Liang, Cunming" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Thomas Monjalon References: <1434686442-578-1-git-send-email-cunming.liang@intel.com> <1437113775-32199-7-git-send-email-cunming.liang@intel.com> <1831628.YzNoj6xjSe@xps13> <1790585.Z8rAdeIt1H@xps13> In-Reply-To: <1790585.Z8rAdeIt1H@xps13> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, shemming@brocade.com Subject: Re: [dpdk-dev] [PATCH v14 06/13] eal/linux: standalone intr event fd create support 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: Mon, 20 Jul 2015 02:08:21 -0000 On 7/20/2015 7:39 AM, Thomas Monjalon wrote: > 2015-07-20 01:35, Thomas Monjalon: >> 2015-07-17 14:16, Cunming Liang: >>> +#ifdef RTE_NEXT_ABI >>> +extern int >>> +rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd); >>> +#else >>> +static inline int >>> +rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd) >>> +{ >>> + RTE_SET_USED(intr_handle); >>> + RTE_SET_USED(nb_efd); >>> + return 0; >>> +} >>> +#endif >> [...] >>> +#ifdef RTE_NEXT_ABI >>> +extern void >>> +rte_intr_efd_disable(struct rte_intr_handle *intr_handle); >>> +#else >>> +static inline void >>> +rte_intr_efd_disable(struct rte_intr_handle *intr_handle) >>> +{ >>> + RTE_SET_USED(intr_handle); >>> +} >>> +#endif >> [...] >>> +#ifdef RTE_NEXT_ABI >>> +static inline int >>> +rte_intr_dp_is_en(struct rte_intr_handle *intr_handle) >>> +{ >>> + return !(!intr_handle->nb_efd); >>> +} >>> +#else >>> +static inline int >>> +rte_intr_dp_is_en(struct rte_intr_handle *intr_handle) >>> +{ >>> + RTE_SET_USED(intr_handle); >>> + return 0; >>> +} >>> +#endif >> [...] >>> +#ifdef RTE_NEXT_ABI >>> +static inline int >>> +rte_intr_allow_others(struct rte_intr_handle *intr_handle) >>> +{ >>> + return !!(intr_handle->max_intr - intr_handle->nb_efd); >>> +} >>> +#else >>> +static inline int >>> +rte_intr_allow_others(struct rte_intr_handle *intr_handle) >>> +{ >>> + RTE_SET_USED(intr_handle); >>> + return 1; >>> +} >>> +#endif >> Why these #else cases? > Why not totally removing these ifdef in the header and use them in .c? That's a good idea, will take it. Thanks. > >>> --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map >>> +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map >>> @@ -117,6 +117,10 @@ DPDK_2.1 { >>> >>> rte_epoll_ctl; >>> rte_epoll_wait; >>> + rte_intr_allow_others; >>> + rte_intr_dp_is_en; >>> + rte_intr_efd_enable; >>> + rte_intr_efd_disable; >> If RTE_NEXT_ABI is disabled, these symbols do not exist. >> An alternate .map would be needed. You're right, will take your suggestion above.