From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 483A7C332 for ; Mon, 20 Jul 2015 01:40:59 +0200 (CEST) Received: by wgbcc4 with SMTP id cc4so25479539wgb.3 for ; Sun, 19 Jul 2015 16:40:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=LolFRyU+n2xUjWszcvI6Qr5/2ADZQMn9RXGbLjD7Brw=; b=HEUSOwKVUxwxic85x33F28a8tsF/7W6A2JeWLKYYy/ghlZLzpZAYImJXReCPYZ9typ B2LEuEiZ45kQKzTf2+xBWzFC3pkQaYw/CT5dfhhmDzLzJneZI2C7G1Qj+O/KOppNXUpo tOC6a7h38TxqmTywZh9vZyAnAgTe6QZEiRDs9XHOsl8KRw00HAty5pQ4RKaelLGQRLkk jNxaMgrjO90iNd7SkycAFmb94fvs7I6VyiMI+rDnAxAwyo35b7Cr69kwMHQSEWTq6QPD 6CIUYUkIupfsFdmT8Ylr3WDSQw9xNsnvgvO4kRdC7F6C/STJ3vQKkW5aF/pRM5v1z1/f OzNQ== X-Gm-Message-State: ALoCoQm0lcoXjkGnIkkaCkNmqoqLrNiMh0jcZCfcwgxirVfryKX0qMQAhkSzR2rn/ljqoZSrUqVl X-Received: by 10.180.74.132 with SMTP id t4mr16904675wiv.55.1437349259107; Sun, 19 Jul 2015 16:40:59 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id l6sm9026111wib.18.2015.07.19.16.40.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 16:40:57 -0700 (PDT) From: Thomas Monjalon To: Cunming Liang Date: Mon, 20 Jul 2015 01:39:45 +0200 Message-ID: <1790585.Z8rAdeIt1H@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1831628.YzNoj6xjSe@xps13> References: <1434686442-578-1-git-send-email-cunming.liang@intel.com> <1437113775-32199-7-git-send-email-cunming.liang@intel.com> <1831628.YzNoj6xjSe@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Sun, 19 Jul 2015 23:40:59 -0000 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? > > --- 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.