DPDK patches and discussions
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset
Date: Mon, 03 Sep 2018 15:18:33 +0100	[thread overview]
Message-ID: <1535984313.11823.45.camel@debian.org> (raw)
In-Reply-To: <039ED4275CED7440929022BC67E706115327F55B@SHSMSX103.ccr.corp.intel.com>

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 <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > Subject: [dpdk-dev] [PATCH] net/ixgbe: do not return internal code
> > in
> > rte_eth_dev_reset
> > 
> > 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.
> > 
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> >  drivers/net/ixgbe/base/ixgbe_vf.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > 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)
> >  		usec_delay(5);
> >  	}
> > 
> > +	/*
> > +	 * 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;
> 
> 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

-- 
Kind regards,
Luca Boccassi

  reply	other threads:[~2018-09-03 14:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21 11:06 Luca Boccassi
2018-08-21 11:17 ` Ananyev, Konstantin
2018-09-03 12:54 ` Zhang, Qi Z
2018-09-03 14:18   ` Luca Boccassi [this message]
2018-09-03 14:18 ` [dpdk-dev] [PATCH v2] " Luca Boccassi
2018-09-05 12:35   ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535984313.11823.45.camel@debian.org \
    --to=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).