From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 12/13] i40e: return -errno when intr setup fails Date: Thu, 22 Dec 2016 15:45:35 +0000 Message-ID: <9ab7c196-9e45-dfdc-92e6-d736ece10b4a@intel.com> References: <7f9c82cc9331585b82fcf680ffe873700808408f.1481590851.git.mirq-linux@rere.qmqm.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , dev@dpdk.org Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 221BD10DAC for ; Thu, 22 Dec 2016 16:45:37 +0100 (CET) In-Reply-To: <7f9c82cc9331585b82fcf680ffe873700808408f.1481590851.git.mirq-linux@rere.qmqm.pl> 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 12/13/2016 1:08 AM, Michał Mirosław wrote: > Signed-off-by: Michał Mirosław > --- > drivers/net/i40e/i40e_ethdev.c | 5 +++-- > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index 67778ba..39fbcfe 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -1692,8 +1692,9 @@ i40e_dev_start(struct rte_eth_dev *dev) > !RTE_ETH_DEV_SRIOV(dev).active) && > dev->data->dev_conf.intr_conf.rxq != 0) { > intr_vector = dev->data->nb_rx_queues; > - if (rte_intr_efd_enable(intr_handle, intr_vector)) > - return -1; > + ret = rte_intr_efd_enable(intr_handle, intr_vector); > + if (ret) > + return ret; What is the benefit of returning -errno instead of -1? > } > > if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) { > diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c > index 47a3b20..f7a8ce3 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c > +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c > @@ -1157,7 +1157,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd) > RTE_LOG(ERR, EAL, > "can't setup eventfd, error %i (%s)\n", > errno, strerror(errno)); > - return -1; > + return -errno; > } > intr_handle->efds[i] = fd; > } >