From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 34D621B608 for ; Fri, 14 Dec 2018 04:22:08 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 19:22:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,351,1539673200"; d="scan'208";a="259367188" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 13 Dec 2018 19:22:07 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 13 Dec 2018 19:22:06 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 13 Dec 2018 19:22:06 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.201]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.59]) with mapi id 14.03.0415.000; Fri, 14 Dec 2018 11:22:04 +0800 From: "Yan, Zhirun" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "Wang, Haiyue" Thread-Topic: [PATCH v3 1/2] net/i40e: support VF request more queues Thread-Index: AQHUkq0QyqkIIzcYmUy3KjZvuWYa5aV793kAgAGaUcA= Date: Fri, 14 Dec 2018 03:22:04 +0000 Message-ID: <2F9759EBFF61914290A3BA61BDBE2C860B9D9765@SHSMSX101.ccr.corp.intel.com> References: <20181128165806.78934-1-zhirun.yan@intel.com> <20181213140505.14578-1-zhirun.yan@intel.com> <20181213140505.14578-2-zhirun.yan@intel.com> <039ED4275CED7440929022BC67E70611532FE60E@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E70611532FE60E@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, 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 v3 1/2] net/i40e: support VF request more queues 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: Fri, 14 Dec 2018 03:22:08 -0000 Hi Qi, > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, December 13, 2018 6:49 PM > To: Yan, Zhirun ; dev@dpdk.org > Cc: Wang, Haiyue > Subject: RE: [PATCH v3 1/2] net/i40e: support VF request more queues >=20 >=20 >=20 > > -----Original Message----- > > From: Yan, Zhirun > > Sent: Thursday, December 13, 2018 10:05 PM > > To: dev@dpdk.org; Zhang, Qi Z > > Cc: Yan, Zhirun ; Wang, Haiyue > > > > Subject: [PATCH v3 1/2] net/i40e: support VF request more queues > > > > Before this patch, VF gets a default number of queues from the PF. > > This patch enables VF to request a different number. When VF > > configures more queues, it will send VIRTCHNL_OP_REQUEST_QUEUES to PF > > to request more queues, if success, PF will reset the VF. > > > > User can run "port stop all", "port config port_id rxq/txq queue_num" > > and "port start all" to reconfigure queue number. > > > > Signed-off-by: Zhirun Yan > > Signed-off-by: Haiyue Wang > > --- > > drivers/net/i40e/i40e_ethdev_vf.c | 56 > > ++++++++++++++++++++++++++++--- > > 1 file changed, 52 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > > b/drivers/net/i40e/i40e_ethdev_vf.c > > index cecedc91f..50e3f1f4f 100644 > > --- a/drivers/net/i40e/i40e_ethdev_vf.c > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > > @@ -343,6 +343,7 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, > > struct vf_cmd_info *args) > > err =3D 0; > > break; > > case VIRTCHNL_OP_VERSION: > > + case VIRTCHNL_OP_REQUEST_QUEUES: > > case VIRTCHNL_OP_GET_VF_RESOURCES: > > /* for init adminq commands, need to poll the response */ > > err =3D -1; > > @@ -350,8 +351,15 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, > > struct vf_cmd_info *args) > > ret =3D i40evf_read_pfmsg(dev, &info); > > vf->cmd_retval =3D info.result; > > if (ret =3D=3D I40EVF_MSG_CMD) { > > - err =3D 0; > > + if (info.ops !=3D > VIRTCHNL_OP_REQUEST_QUEUES) > > + err =3D 0; > > break; > > + } else if (ret =3D=3D I40EVF_MSG_SYS) { > > + if (args->ops =3D=3D > VIRTCHNL_OP_REQUEST_QUEUES && >=20 > OK, for VIRTCHNL_OP_REQUEST_QUEUES, we will ignore async reply > (I40EVF_MSG_CMD) but only wait for system message (I40EVF_MSG_SYS) I > think it's better to create new branch for case > VIRTCHNL_OP_REQUEST_QUEUES to make code more readable. >=20 Yes, I will send a new version without it and create new patchs for handlin= g msg from pf. > > + vf->vf_reset) { > > + err =3D 0; > > + break; > > + } > > } else if (ret =3D=3D I40EVF_MSG_ERR) > > break; > > rte_delay_ms(ASQ_DELAY_MS);