DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix wrong return value when handling PF message
Date: Tue, 3 Jan 2017 02:58:57 +0000	[thread overview]
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B554DE0@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <3f15d1e2-7fad-21c4-cc1e-122e4cadf2de@intel.com>

Hi Ferruh,


> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, December 23, 2016 12:59 AM
> To: Lu, Wenzhuo; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix wrong return value when handling
> PF message
> 
> On 12/21/2016 8:29 AM, Wenzhuo Lu wrote:
> > When VF receives a message from PF, it should check the return value.
> > But in i40evf_execute_vf_cmd the value is ignored and not returned to
> > the caller.
> >
> > Fixes: 95cd21f45d1b ("i40evf: allocate virtchnl commands buffer per
> > VF")
> >
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > ---
> >  drivers/net/i40e/i40e_ethdev.h    | 2 +-
> >  drivers/net/i40e/i40e_ethdev_vf.c | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.h
> > b/drivers/net/i40e/i40e_ethdev.h index 298cef4..28111a7 100644
> > --- a/drivers/net/i40e/i40e_ethdev.h
> > +++ b/drivers/net/i40e/i40e_ethdev.h
> > @@ -527,7 +527,7 @@ struct i40e_vf {
> >  	enum i40e_aq_link_speed link_speed;
> >  	bool vf_reset;
> >  	volatile uint32_t pend_cmd; /* pending command not finished yet */
> > -	uint32_t cmd_retval; /* return value of the cmd response from PF */
> > +	int32_t cmd_retval; /* return value of the cmd response from PF */
> >  	u16 pend_msg; /* flags indicates events from pf not handled yet */
> >  	uint8_t *aq_resp; /* buffer to store the adminq response from PF */
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> > b/drivers/net/i40e/i40e_ethdev_vf.c
> > index 12da0ec..5d25764 100644
> > --- a/drivers/net/i40e/i40e_ethdev_vf.c
> > +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> > @@ -361,6 +361,7 @@ struct rte_i40evf_xstats_name_off {
> >  		err = -1;
> >  		do {
> >  			ret = i40evf_read_pfmsg(dev, &info);
> > +			vf->cmd_retval = info.result;
> 
> This is for op_version, and op_get_vf_resources! Which seems good.
> 
> Is something similar required for other commands (default case of the switch),
> but for them not sure how to get retval (event.desc.cookie_low to
> vf->cmd_retval) ?
There's no same issue for the other ops :)

> 
> >  			if (ret == I40EVF_MSG_CMD) {
> >  				err = 0;
> >  				break;
> >

  reply	other threads:[~2017-01-03  2:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-21  8:29 Wenzhuo Lu
2016-12-22 16:59 ` Ferruh Yigit
2017-01-03  2:58   ` Lu, Wenzhuo [this message]
2017-01-03 17:13 ` Ferruh Yigit

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=6A0DE07E22DDAD4C9103DF62FEBC09093B554DE0@shsmsx102.ccr.corp.intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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).