From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP; 22 Dec 2016 07:45:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,389,1477983600"; d="scan'208";a="45479307" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by orsmga005.jf.intel.com with ESMTP; 22 Dec 2016 07:45:36 -0800 From: Ferruh Yigit To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , dev@dpdk.org References: <7f9c82cc9331585b82fcf680ffe873700808408f.1481590851.git.mirq-linux@rere.qmqm.pl> Message-ID: <9ab7c196-9e45-dfdc-92e6-d736ece10b4a@intel.com> Date: Thu, 22 Dec 2016 15:45:35 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <7f9c82cc9331585b82fcf680ffe873700808408f.1481590851.git.mirq-linux@rere.qmqm.pl> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 12/13] i40e: return -errno when intr setup fails 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: , X-List-Received-Date: Thu, 22 Dec 2016 15:45:38 -0000 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; > } >