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 EF2BE1B454 for ; Thu, 13 Dec 2018 11:49:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 02:49:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,348,1539673200"; d="scan'208";a="100378310" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 13 Dec 2018 02:49:09 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 13 Dec 2018 02:49:08 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 13 Dec 2018 02:49:08 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.59]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.210]) with mapi id 14.03.0415.000; Thu, 13 Dec 2018 18:49:06 +0800 From: "Zhang, Qi Z" To: "Yan, Zhirun" , "dev@dpdk.org" CC: "Wang, Haiyue" Thread-Topic: [PATCH v3 1/2] net/i40e: support VF request more queues Thread-Index: AQHUkq0Q0L4QWdn1KEuxa5eE2qd3Q6V8eQIg Date: Thu, 13 Dec 2018 10:49:06 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532FE60E@SHSMSX103.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> In-Reply-To: <20181213140505.14578-2-zhirun.yan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzkxODg5MjMtZDBkOS00ZTc0LTgxMDQtN2NhOGQ5NmQ3NDhlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiV09LZ1RqZ28rUnFMM1BZWVVwNTg4UDE0TGI2OTRDRkgrSk1CXC9KWHJDRHhaQm1DMDhkQUhRV2htQ0ROTXVRWDgifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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: Thu, 13 Dec 2018 10:49:12 -0000 > -----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 >=20 > 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 m= ore > queues, it will send VIRTCHNL_OP_REQUEST_QUEUES to PF to request more > queues, if success, PF will reset the VF. >=20 > User can run "port stop all", "port config port_id rxq/txq queue_num" > and "port start all" to reconfigure queue number. >=20 > 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(-) >=20 > 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, struc= t > 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 && 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_QUEUE= S to make code more readable. > + vf->vf_reset) { > + err =3D 0; > + break; > + } > } else if (ret =3D=3D I40EVF_MSG_ERR) > break; > rte_delay_ms(ASQ_DELAY_MS);