From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B12DD29C7 for ; Tue, 3 Jan 2017 03:59:01 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 02 Jan 2017 18:59:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,451,1477983600"; d="scan'208";a="804444629" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 02 Jan 2017 18:59:00 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 2 Jan 2017 18:58:58 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 2 Jan 2017 18:59:00 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Tue, 3 Jan 2017 10:58:58 +0800 From: "Lu, Wenzhuo" To: "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix wrong return value when handling PF message Thread-Index: AQHSW2RvE07wmJEXt0ii/ptV/81um6ETrJEAgBJ2XGA= Date: Tue, 3 Jan 2017 02:58:57 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B554DE0@shsmsx102.ccr.corp.intel.com> References: <1482308980-76777-1-git-send-email-wenzhuo.lu@intel.com> <3f15d1e2-7fad-21c4-cc1e-122e4cadf2de@intel.com> In-Reply-To: <3f15d1e2-7fad-21c4-cc1e-122e4cadf2de@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix wrong return value when handling PF message 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: Tue, 03 Jan 2017 02:59:02 -0000 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 han= dling > PF message >=20 > 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 > > --- > > 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 =3D -1; > > do { > > ret =3D i40evf_read_pfmsg(dev, &info); > > + vf->cmd_retval =3D info.result; >=20 > This is for op_version, and op_get_vf_resources! Which seems good. >=20 > Is something similar required for other commands (default case of the swi= tch), > 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 :) >=20 > > if (ret =3D=3D I40EVF_MSG_CMD) { > > err =3D 0; > > break; > >