From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ananyev, Konstantin" Subject: Re: [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset Date: Tue, 21 Aug 2018 11:17:17 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258E9FA2BAB@IRSMSX102.ger.corp.intel.com> References: <20180821110649.26711-1-bluca@debian.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Lu, Wenzhuo" To: Luca Boccassi , "dev@dpdk.org" Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E2A933DC for ; Tue, 21 Aug 2018 13:17:20 +0200 (CEST) In-Reply-To: <20180821110649.26711-1-bluca@debian.org> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Luca Boccassi [mailto:bluca@debian.org] > Sent: Tuesday, August 21, 2018 12:07 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > Subject: [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_re= set >=20 > In case of a temporary failure the ixgbe driver can return the internal > error IXGBE_ERR_RESET_FAILED to the application. Instead, return > -EAGAIN as per the public API specification. >=20 > Signed-off-by: Luca Boccassi > --- > drivers/net/ixgbe/base/ixgbe_vf.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/i= xgbe_vf.c > index 5b25a6b4d4..62f2bf2e7d 100644 > --- a/drivers/net/ixgbe/base/ixgbe_vf.c > +++ b/drivers/net/ixgbe/base/ixgbe_vf.c > @@ -203,8 +203,13 @@ s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw) > usec_delay(5); > } >=20 > + /* > + * This error code will be propagated to the app by rte_eth_dev_reset, > + * so use a public error code rather than the internal-only > + * IXGBE_ERR_RESET_FAILED > + */ > if (!timeout) > - return IXGBE_ERR_RESET_FAILED; > + return -EAGAIN; >=20 > /* Reset VF registers to initial values */ > ixgbe_virt_clr_reg(hw); > -- > 2.18.0 Acked-by: Konstantin Ananyev