From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 0FB2E1B354 for ; Thu, 18 Jan 2018 17:04:40 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id t74so23125290wme.3 for ; Thu, 18 Jan 2018 08:04:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=jHEmu2vxc9nNNwjuv7hDFE/76C5oe8KND1P9GW3XeDc=; b=fN6zR5VBimtfKV96QpR2A03nhE6GQY/WNNMDTaCY6GL9ZDjAXDKWjs7Ip+weuhnRci ryauDRQGESfKaW8gok2wZU3rdbS/c7GGBLJxscZPRF92pCMAAbhqh8nHt5CRD9yONagL 8OwahouWJ1jNXNzWcj42+4U31a2JKtrAHrfs6zugoAZCIISQIHnBhQPNJZFnEHzu8OHn 2TN0aQBe72sS2QYqBR33d7FQPlc2XstcZOIrhTOaXJDZDdMuXit7vR5m9p19Q4z+pMaQ 8EH+lTKj4AvnpmJ83vt/PziUuUwu/XPmjOOVZDkdo1Y0O5XcDo1SwKnDxCqO48YSIOKg afwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=jHEmu2vxc9nNNwjuv7hDFE/76C5oe8KND1P9GW3XeDc=; b=ugO/m05q9L2lx+EYUfl9j2ZeK9W5Jao3Uvjq+LwtsKWbStGSLMeT4FGiK/6xmldBbn jWMJnqJyDfA4026CYWnNNNDfwR2O/znsZvKi34WCEOSaxcRz9Wtt4tCFWSUjlnwy6DeY 9QNwk484VAgVnnGrTCd5AsGTFge/wU8dMvMkXYpuyvuFvv/jQMloGnaOEXgk+dB4Ln6q Nej3GGNccS6LArUGlpnJExSZg+7f/816Dr1gBelD6Arwt78vnf3HzbfRrmy6ziztM0DW b4xv7IEWsZUgvpexmib+n29ipZqwfTEAWHfbDlj4A9KPyKWnkb96VU+FotqrgeDcxblA YX3g== X-Gm-Message-State: AKwxytf4UjtqI0tlWl4qrHDEvcSKlgp2zmtgqwNZ5CIP3R5hXf9Fh0nD e+yZLGVEcM1eygNG4FQlD/op X-Google-Smtp-Source: ACJfBot7l6CehVpJ+vLDdM6EBS3Twni3ewwR5usqPnXTco5qjQmUJA+IfQEBWDeSrz8fpUU8mrfz3A== X-Received: by 10.28.235.10 with SMTP id j10mr5152101wmh.54.1516291480549; Thu, 18 Jan 2018 08:04:40 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id c54sm10034037wrg.68.2018.01.18.08.04.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 08:04:39 -0800 (PST) Date: Thu, 18 Jan 2018 17:04:27 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Olivier Matz Cc: dev@dpdk.org, Adrien Mazarguil , Yongseok Koh , stable@dpdk.org Message-ID: <20180118160427.4fokyhq7koux6ga6@laranjeiro-vm.dev.6wind.com> References: <20180118130043.31773-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180118130043.31773-1-olivier.matz@6wind.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH 1/2] net/mlx5: fix return value of start operation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2018 16:04:41 -0000 On Thu, Jan 18, 2018 at 02:00:42PM +0100, Olivier Matz wrote: > On error, mlx5_dev_start() does not return a negative value > as it is supposed to do. The consequence is that the application > (ex: testpmd) does not notice that the port is not started > and begins the rxtx on an uninitialized port, which crashes. > > Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management") > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz > --- > drivers/net/mlx5/mlx5_trigger.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c > index 1a20967a2..44f702daa 100644 > --- a/drivers/net/mlx5/mlx5_trigger.c > +++ b/drivers/net/mlx5/mlx5_trigger.c > @@ -166,6 +166,7 @@ mlx5_dev_start(struct rte_eth_dev *dev) > ERROR("%p: an error occurred while configuring control flows:" > " %s", > (void *)priv, strerror(err)); > + err = -err; > goto error; > } > err = priv_flow_start(priv, &priv->flows); > @@ -173,6 +174,7 @@ mlx5_dev_start(struct rte_eth_dev *dev) > ERROR("%p: an error occurred while configuring flows:" > " %s", > (void *)priv, strerror(err)); > + err = -err; > goto error; > } > err = priv_rx_intr_vec_enable(priv); > @@ -196,7 +198,7 @@ mlx5_dev_start(struct rte_eth_dev *dev) > priv_rxq_stop(priv); > priv_flow_delete_drop_queue(priv); > priv_unlock(priv); > - return -err; > + return err; > } > > /** err in the function is handled with positives errno's, adding only those two and returning err will make the other positive. Regards, -- Nélio Laranjeiro 6WIND