From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=h58ETZXdDgLIGsqEordl4tyNBiaigafsBYMmTUrFxbA=; b=VVUkYpAdyPzPew8RLhw4eNXO2kjmVqpd9GHe5Y/jjyMCY3v2eprPsGA/HtwxZ+3Fdn J5ocHy2GqKIlKhQ1vAyN7tgzu65zp6heI3GXEs72Lxa3jkEdHgq3Cglj6XRBp4r03VBk 23joklBfFzjczdVGdGEfHhYKi9GDeBTL1T5ViUic/z9YxIPoDnMqpYpZ6KAfVUVBQibE WasKKIjdB627H4H9jwE3sDPMjL0W0cVolNhfZHN5Yj7LtUP7nhgmA5ZIUv2hhTAtgv7p gKqEbq/MoiYAGSv4jELQTeYcPk3uaW4P0mEkyvy+ICAGgQtR7x19qIfgot13xCR98Mi6 WvAQ== X-Gm-Message-State: APzg51CyU8ZeYGj9KwpkTCoyyUQWsKgd205XRqv66GYixr0yY9yiVFgw brHEw/3I8GESJNqR0w+OeBo= X-Google-Smtp-Source: ANB0Vdb64oAW2FYwekbmshjDRHg7Z/wHdBgKeSE72x4th6SrObzlq3kNsGfofXTdmwfATLNY+pMPqw== X-Received: by 2002:adf:b202:: with SMTP id u2-v6mr17923097wra.19.1535984315167; Mon, 03 Sep 2018 07:18:35 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id j11-v6sm14676242wrr.37.2018.09.03.07.18.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Sep 2018 07:18:34 -0700 (PDT) Message-ID: <1535984313.11823.45.camel@debian.org> From: Luca Boccassi To: "Zhang, Qi Z" , "dev@dpdk.org" Cc: "Lu, Wenzhuo" , "Ananyev, Konstantin" Date: Mon, 03 Sep 2018 15:18:33 +0100 In-Reply-To: <039ED4275CED7440929022BC67E706115327F55B@SHSMSX103.ccr.corp.intel.com> References: <20180821110649.26711-1-bluca@debian.org> <039ED4275CED7440929022BC67E706115327F55B@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset 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: Mon, 03 Sep 2018 14:18:35 -0000 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