From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset Date: Mon, 03 Sep 2018 15:18:33 +0100 Message-ID: <1535984313.11823.45.camel@debian.org> References: <20180821110649.26711-1-bluca@debian.org> <039ED4275CED7440929022BC67E706115327F55B@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: "Lu, Wenzhuo" , "Ananyev, Konstantin" To: "Zhang, Qi Z" , "dev@dpdk.org" Return-path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 6D8645F25 for ; Mon, 3 Sep 2018 16:18:35 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id v17-v6so820821wrr.9 for ; Mon, 03 Sep 2018 07:18:35 -0700 (PDT) In-Reply-To: <039ED4275CED7440929022BC67E706115327F55B@SHSMSX103.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 2018-09-03 at 12:54 +0000, Zhang, Qi Z wrote: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi > > Sent: Tuesday, August 21, 2018 7:07 PM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > > > Subject: [dpdk-dev] [PATCH] net/ixgbe: do not return internal code > > in > > rte_eth_dev_reset > >=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 > > --- > > =C2=A0drivers/net/ixgbe/base/ixgbe_vf.c | 7 ++++++- > > =C2=A01 file changed, 6 insertions(+), 1 deletion(-) > >=20 > > diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c > > b/drivers/net/ixgbe/base/ixgbe_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) > > =C2=A0 usec_delay(5); > > =C2=A0 } > >=20 > > + /* > > + =C2=A0* This error code will be propagated to the app by > > rte_eth_dev_reset, > > + =C2=A0* so use a public error code rather than the internal- > > only > > + =C2=A0* IXGBE_ERR_RESET_FAILED > > + =C2=A0*/ > > =C2=A0 if (!timeout) > > - return IXGBE_ERR_RESET_FAILED; > > + return -EAGAIN; >=20 > I think it's better not to change this in base code which are assumed > to only return IXGBE_ERR_xxx > And also this is not the only place in ixgbe_reset_hw_vf that will > propagated the internal error. > Why not convert it in "eth_ixgbevf_dev_init" which looks like a right > place? Ok, done in v2 --=20 Kind regards, Luca Boccassi