From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id C818D1B354 for ; Thu, 18 Jan 2018 17:04:40 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id f71so22950483wmf.0 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=kc0V78vtg96iSlC4o3eOE3t6uvPC1AfPOfwNfwqC6hLodI3YPW8wl3QUM24fhdirm/ LEqWvDQMcB+AVZk4VymQhHWC3+4RYZZZv2joTfPjLtk894xZcVovD6Ki6iZXGN2HLLnO MCLBUO1mrKUvvjxEkavL7V0mGERciKD3bq8TdjG4XU9J6YzDN8PwVHrKbrmYt0mSTtDk /Nr0lwV0j41XAi+l7NaXdRK0n6uM5zxm1xDmITAxXZrGdNu0zKQQIBhwIzLDXgWLLB2A 8gYzl3jqoBargNZ7nQYkG4pK2FhKrIpHrLSSeGaGK2Onq4KiHOnS8DDKqDQAjNfgE6vy 5XCg== X-Gm-Message-State: AKwxyteqRaBgqYWy3g6Du6MU2jnv3ZCVzwgseBWLvDW/4t9noM89Ly+I ATJ9ir1kuxY4OxdQ55aCUQ3J 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-dev] [PATCH 1/2] net/mlx5: fix return value of start operation 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, 18 Jan 2018 16:04:40 -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