From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 596757F1C for ; Tue, 5 Jun 2018 08:52:21 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id e16-v6so2670057wmd.0 for ; Mon, 04 Jun 2018 23:52:21 -0700 (PDT) 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=ldRNZNh0DuWFvzFr5M8k2T6eDsBAf5uo9ZDaYZmCP0c=; b=IJv7W/m2xY7H28A1rUZf3K0wxvNkENeCb2IM6wxTobFLRPPeHW5ynJJvNDGwOBvma2 ptlKlQrH2NUIpX3Ou7W8SXet/l52/k+N0Nqo6hVS3UvlPt6tq9YOh1fsvU/IUSHdNOuR dL3890DN9Igr7HRYeNnzXKYsYGK3aRm7l5ZRzrBIyTkYNlsp7hO/m+HOjeoUCBD3qHTk Asb6uHm2CSvmNF3vM1Zu6kwh14HgPxXVrvzCMrHVMkTRXR+t6sMWkG2dSVEjn0gVRSRv KeOx/n9Gsq1ya+nggaPjjJ9jDkntDdLM1KcLV/kX39ZAU/E4PsrtkYgwQYnYCx+BFlay 0LRg== 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=ldRNZNh0DuWFvzFr5M8k2T6eDsBAf5uo9ZDaYZmCP0c=; b=ZmazGsTgW+j85v4yt0yWdVadxNITTlmLlaWsrwJuVUGyM6utVGi7hV7KEeqzzcMyux uLnElASVwj7M/eBCeTmypuK5dLbcQpB0asms55nJqo99tIfyoo/wxLiruUmDXgkfYOoe vn1jHwTYQQb+RIZnPMpj6IHcOcYwojWeAPN7XMv6vuuM6wj8D0v8bVB3sqeTOjpwZBry pEdg0dsbdldWc5r5/gCi18u97E3xWikEOdP9YTZB8E7gor+dpJk7tJUkcp1H9NZcPDya 55316+Cj7pus3MVycSld111pr2E0mSJvpQVVLRj2dXSkV4ZmfSY+FnoKsnJBZS+YgmIb /oTQ== X-Gm-Message-State: APt69E3LITgeI4KuNYYOsz7ESWODMYwC8KThVcuahIbhHzGo851DKdHF ImUW7iCr/TnSALNvGpN2eBDo X-Google-Smtp-Source: ADUXVKJfLqnvZgHO3fINOcuqRXUlNllSXVr6O/oJ0KFqu/r/6/Tbzlv1soPe+L2d1BY8LGRvpIw+jw== X-Received: by 2002:a1c:ad50:: with SMTP id w77-v6mr1244492wme.54.1528181541030; Mon, 04 Jun 2018 23:52:21 -0700 (PDT) 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 c11-v6sm28697072wri.49.2018.06.04.23.52.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 23:52:20 -0700 (PDT) Date: Tue, 5 Jun 2018 08:52:46 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Yongseok Koh Cc: adrien.mazarguil@6wind.com, dev@dpdk.org, shahafs@mellanox.com, stable@dpdk.org Message-ID: <20180605065246.mw7xnk24cfwxy4an@laranjeiro-vm.dev.6wind.com> References: <20180604173731.29125-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180604173731.29125-1-yskoh@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix error number handling 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: Tue, 05 Jun 2018 06:52:21 -0000 On Mon, Jun 04, 2018 at 10:37:31AM -0700, Yongseok Koh wrote: > rte_errno should be saved only if error has occurred because rte_errno > could have garbage value. > > Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values") > Cc: stable@dpdk.org > > Signed-off-by: Yongseok Koh > --- > drivers/net/mlx5/mlx5_flow.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 994be05be..eaffe7495 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -3561,7 +3561,8 @@ mlx5_fdir_filter_delete(struct rte_eth_dev *dev, > /* The flow does not match. */ > continue; > } > - ret = rte_errno; /* Save rte_errno before cleanup. */ > + if (ret) > + ret = rte_errno; /* Save rte_errno before cleanup. */ > if (flow) > mlx5_flow_list_destroy(dev, &priv->flows, flow); > exit: > -- > 2.11.0 This patch is not enough, the returned value being -rte_errno if no error is detected by the function it cannot set rte_errno nor return it. Thanks, -- Nélio Laranjeiro 6WIND