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 E80FF1B1A5 for ; Fri, 22 Sep 2017 22:13:35 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Sep 2017 13:13:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,427,1500966000"; d="scan'208";a="131458584" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga004.jf.intel.com with ESMTP; 22 Sep 2017 13:13:33 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.36]) by IRSMSX101.ger.corp.intel.com ([169.254.1.22]) with mapi id 14.03.0319.002; Fri, 22 Sep 2017 21:13:33 +0100 From: "Chilikin, Andrey" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "Xing, Beilei" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush Thread-Index: AQHTLdIyWSCkqcFd5EGFzi1LgSAsQKK/xJlwgADOU4CAAM18MA== Date: Fri, 22 Sep 2017 20:13:31 +0000 Message-ID: References: <1505282644-40415-1-git-send-email-wei.zhao1@intel.com> <1505445188-70251-1-git-send-email-wei.zhao1@intel.com> <1505445188-70251-2-git-send-email-wei.zhao1@intel.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODRmOTA3YTAtMjlmZS00ZWY0LTk3MjEtZWQwNDZiNTQ1OTBhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjVqRFd2eDIxYW5RdFR0emx1cytBY01VS2g4RmJ3aUg0VFhiMnIrTFlzQWM9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush 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, 22 Sep 2017 20:13:36 -0000 Hi Wei > -----Original Message----- > From: Zhao1, Wei > Sent: Friday, September 22, 2017 9:49 AM > To: Chilikin, Andrey ; dev@dpdk.org > Cc: Yigit, Ferruh ; Xing, Beilei > ; Wu, Jingjing > Subject: RE: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flu= sh >=20 > Hi=1B$B!$=1B(BAndrey >=20 > > -----Original Message----- > > From: Chilikin, Andrey > > Sent: Friday, September 22, 2017 3:53 AM > > To: Zhao1, Wei ; dev@dpdk.org > > Cc: Zhao1, Wei ; Yigit, Ferruh > > ; Xing, Beilei ; Wu, Jin= gjing > > > > Subject: RE: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and > flush > > > + if (i =3D=3D I40E_REGION_MAX_INDEX) { > > > + printf("The region sizes should be any of the following " > > > + "values: 1, 2, 4, 8, 16, 32, 64 as long as the " > > > + "total number of queues do not exceed the VSI allocation"); printf? > > > + return ret; > > > + } > > > + > > > + if (conf_ptr->region_id >=3D I40E_REGION_MAX_INDEX) { > > > + PMD_INIT_LOG(ERR, "the queue region max index is 7"); > > > + return ret; > > > + } > > > + > > > + switch (op_type) { > > > + case RTE_PMD_I40E_QUEUE_REGION_SET: > > > + ret =3D i40e_set_queue_region(pf, conf_ptr); > > > + break; > > > + case RTE_PMD_I40E_REGION_FLOWTYPE_PF_SET: > > > + ret =3D i40e_set_region_flowtype_pf(hw, pf, conf_ptr); > > > + break; > > > + case RTE_PMD_I40E_REGION_FLOWTYPE_VF_SET: > > > + ret =3D -EINVAL; > > > + break; > > > > Why setting of flowtype mapping is separated to two different option? > > Does it mean that application will need to detect which driver it uses = before > > calling this API? Application should not care which driver is in use, i= t tracks > the > > number of queues used for RSS and just configures these queues to > > different regions, regardless if it runs on top of PF or VF. Difference= in > > configuration for PF/VF should be hidden from application, so only sing= le > > RTE_PMD_I40E_REGION_FLOWTYPE_SET should be used. >=20 > By now , we only support pf for this config. > But I think what you said is very reasonable. I can change code to a new > scheme: > DPDK i40e driver use rte_eth_dev ->device->name to detect whether his > name is > " net_i40e_vf " or " net_i40e" itself, then we can PMD driver decide t= o > config PFQF_HREGION or VFQF_HREGION. > I will make change in v4 later. >=20 > > > > All other options do not have separate check. > > Will they work on both PF and VF? >=20 > No, only WORK on PF. The reason we have talk in other mail before. >=20 Yes, it is why I was confused with separating RTE_PMD_I40E_REGION_FLOWTYPE = to PF and VF. All options work on PF only, by only FLOWTYPE was split to PF= /VF. > > > > > + case RTE_PMD_I40E_UP_REGION_SET: > > > + ret =3D i40e_set_up_region(pf, conf_ptr); > > > + break; > > > + case RTE_PMD_I40E_REGION_ALL_FLUSH_ON: > > > + ret =3D i40e_flush_region_all_conf(hw, pf, 1); > > > + break; > > > + case RTE_PMD_I40E_REGION_ALL_FLUSH_OFF: > > > + ret =3D i40e_flush_region_all_conf(hw, pf, 0); > > > + break; > > > + Could you explain what is the difference between FLUSH_OFF and FLUSH_ON and= how it can be used by an application? > > > + default: > > > + PMD_DRV_LOG(WARNING, "op type (%d) not supported", > > > + op_type); > > > + ret =3D -EINVAL; > > > + break; > > > + } > > > + > > > + I40E_WRITE_FLUSH(hw); > > > + > > > + return ret; > > > +} > > >=20 > > How this API can be tested, is there a separate testpmd patch? >=20 > Yes, testpmd has add new CLI commands to support it, also can be use by > customer. Sorry, missed second part of the patchset. Regards, Andrey