From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rere.qmqm.pl (rere.qmqm.pl [84.10.57.10]) by dpdk.org (Postfix) with ESMTP id E18A610DD9 for ; Fri, 23 Dec 2016 02:55:13 +0100 (CET) Received: by rere.qmqm.pl (Postfix, from userid 1000) id 522856082; Fri, 23 Dec 2016 02:55:13 +0100 (CET) Date: Fri, 23 Dec 2016 02:55:13 +0100 From: =?iso-8859-2?Q?Micha=B3_Miros=B3aw?= To: Ferruh Yigit Cc: dev@dpdk.org Message-ID: <20161223015513.swrfyjmjyq5575ms@rere.qmqm.pl> References: <7f9c82cc9331585b82fcf680ffe873700808408f.1481590851.git.mirq-linux@rere.qmqm.pl> <9ab7c196-9e45-dfdc-92e6-d736ece10b4a@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9ab7c196-9e45-dfdc-92e6-d736ece10b4a@intel.com> User-Agent: Mutt/1.6.2-neo (2016-07-23) 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: Fri, 23 Dec 2016 01:55:14 -0000 On Thu, Dec 22, 2016 at 03:45:35PM +0000, Ferruh Yigit wrote: > 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? Information. Besides, all other error returns from i40e_dev_start return negated error code (-1 happens to be -EPERM, which further confuses the poor developer who's diagnosing the failure). Best Regards, Michał Mirosław