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 09722378B for ; Wed, 20 Jun 2018 09:02:29 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id e16-v6so4142318wmd.0 for ; Wed, 20 Jun 2018 00:02:29 -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=BXIryEMQq22dqYJiWL0yWfFOSfN9FFWn93d5OYe4g2o=; b=ypKglWvE5S/eaB67vfYJZPjbV+9m0DLl20JKSvb2e0d+OR7WawfC5HF5POd+XraFWv epY4tcDo5ZCXFksR2d+BBZ0T2Jwn3rFiZC/03qELR4E8SSRLwJ8jX04yd0YBhK94eo7R aI4Gwsn0qKciVMa5PuLwCBsqxO182zJCevlbIxV0idgkCMyuWynAivm2q4o1vzXvlmJ5 kjYHjqQp1UXFd0B1mhpWOdh3X6SGvNzynT2aa2qEXFjGpellUgoy9Hg6ood826aQylgX LeZdrIli4BpSDG9awc6vwCd95AN9yPwnPI7hhe/AVBtIPVWEqVY6oysidXU16cin+KNm qIqQ== 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=BXIryEMQq22dqYJiWL0yWfFOSfN9FFWn93d5OYe4g2o=; b=K2gmooQehWA5JJwgxFftzldSW0VBr0m/d4A2SBnfc9+/dOo6IuBJqLjRBvKQezgTqH MXVLB/rciPTClP2KluEcFAp7FIhq0B0AObKIXiQy8H77UX5G+jFU6xmJZte8o9E9wzqj uV+ElGjM/Z3PxoMSDCu/a472bpDu/mLzrhUf8f0hioXPc+kA1FfdPbEttNiTQNep51Xl knu2ZOMMZDG3WgpfL4lZtGjYMe5TYi062hJxJDztX6iZqS2uZ5wd0txywGSaN+Ay8SVn 5HXKDHNFJvGtpeN9EdcCBY7gI1wnqu6AohAgDTl/qZQb5ufYttXInNWag2reKIB+bHnC fJDA== X-Gm-Message-State: APt69E1SoFU9/mDQPU7D6T6b5FisjpkfTDjyHDppQDMIiIZvOfi1XsjJ TUxuCaLW1qIporOXAOL0osOX X-Google-Smtp-Source: ADUXVKIt4gjBO7WseFdykGG32lMtgSRDfteW8goLr6kg/tcmRZHH1bmWCKMB5kAmGEvxToxpskRVaQ== X-Received: by 2002:a1c:5b0d:: with SMTP id p13-v6mr669261wmb.53.1529478149753; Wed, 20 Jun 2018 00:02:29 -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 g105-v6sm1542642wrd.37.2018.06.20.00.02.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 00:02:28 -0700 (PDT) Date: Wed, 20 Jun 2018 09:02:40 +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: <20180620070240.nkfjfuzzel6jed7r@laranjeiro-vm.dev.6wind.com> References: <20180604173731.29125-1-yskoh@mellanox.com> <20180619231313.7264-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: <20180619231313.7264-1-yskoh@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH v2] 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: Wed, 20 Jun 2018 07:02:30 -0000 On Tue, Jun 19, 2018 at 04:13:13PM -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 Acked-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_flow.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 994be05be..45207d70e 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -3561,15 +3561,17 @@ mlx5_fdir_filter_delete(struct rte_eth_dev *dev, > /* The flow does not match. */ > continue; > } > - ret = rte_errno; /* Save rte_errno before cleanup. */ > if (flow) > mlx5_flow_list_destroy(dev, &priv->flows, flow); > exit: > + if (ret) > + ret = rte_errno; /* Save rte_errno before cleanup. */ > for (i = 0; i != hash_rxq_init_n; ++i) { > if (parser.queue[i].ibv_attr) > rte_free(parser.queue[i].ibv_attr); > } > - rte_errno = ret; /* Restore rte_errno. */ > + if (ret) > + rte_errno = ret; /* Restore rte_errno. */ > return -rte_errno; > } > > -- > 2.11.0 -- Nélio Laranjeiro 6WIND