From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C7459FE5 for ; Wed, 6 Sep 2017 01:52:31 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 05 Sep 2017 16:52:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,481,1498546800"; d="scan'208";a="1169432515" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga001.jf.intel.com with ESMTP; 05 Sep 2017 16:52:29 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.36]) by IRSMSX102.ger.corp.intel.com ([169.254.2.59]) with mapi id 14.03.0319.002; Wed, 6 Sep 2017 00:52:28 +0100 From: "Chilikin, Andrey" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Xing, Beilei" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH 1/2] net/i40e: queue region set and flush Thread-Index: AQHTHIm0hSmB8+KZs0a39ABJPjuM/6KnCG2g Date: Tue, 5 Sep 2017 23:52:27 +0000 Message-ID: References: <20170824032602.107045-1-wei.zhao1@intel.com> <20170824032602.107045-2-wei.zhao1@intel.com> In-Reply-To: <20170824032602.107045-2-wei.zhao1@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjE3OTQ5NTEtNTU2YS00ODFlLTkwMTYtNmU5ZjIzNGFlZjUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlhwMElqSmZpUWdYMzF4d214U0lla0E2dFVmc1ZSRnR6cmNLbEd4eHBMZ1k9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 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: Tue, 05 Sep 2017 23:52:32 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao > Sent: Wednesday, August 23, 2017 8:26 PM > To: dev@dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH 1/2] net/i40e: queue region set and flush >=20 > This feature enable queue regions configuration for RSS in PF/VF, > so that different traffic classes or different packet > classification types can be separated to different queues in > different queue regions.This patch can set queue region range, > it include queue number in a region and the index of first queue. > This patch enable mapping between different priorities (UP) and > different traffic classes.It also enable mapping between a region > index and a sepcific flowtype(PCTYPE).It also provide the solution > of flush all configuration about queue region the above described. >=20 > Signed-off-by: Wei Zhao > --- > drivers/net/i40e/i40e_ethdev.h | 6 + > drivers/net/i40e/rte_pmd_i40e.c | 287 > ++++++++++++++++++++++++++++++ > drivers/net/i40e/rte_pmd_i40e.h | 39 ++++ > drivers/net/i40e/rte_pmd_i40e_version.map | 7 + > 4 files changed, 339 insertions(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.h > b/drivers/net/i40e/i40e_ethdev.h > index 48abc05..1d6e9b2 100644 > --- a/drivers/net/i40e/i40e_ethdev.h > +++ b/drivers/net/i40e/i40e_ethdev.h > @@ -260,6 +260,12 @@ enum i40e_flxpld_layer_idx { > #define I40E_QOS_BW_WEIGHT_MIN 1 > /* The max bandwidth weight is 127. */ > #define I40E_QOS_BW_WEIGHT_MAX 127 > +/* The max queue region index is 7. */ > +#define I40E_TCREGION_MAX_INDEX 7 > +/* The max queue region userpriority is 7. */ > +#define I40E_REGION_USERPRIORITY_MAX_INDEX 7 > +/* The max pctype index is 63. */ > +#define I40E_REGION_PCTYPE_MAX_INDEX 63 >=20 > /** > * The overhead from MTU to max frame size. > diff --git a/drivers/net/i40e/rte_pmd_i40e.c > b/drivers/net/i40e/rte_pmd_i40e.c > index 950a0d6..5d1e1d4 100644 > --- a/drivers/net/i40e/rte_pmd_i40e.c > +++ b/drivers/net/i40e/rte_pmd_i40e.c > @@ -2117,3 +2117,290 @@ int > rte_pmd_i40e_ptype_mapping_replace(uint8_t port, >=20 > return 0; > } > + > +static int > +i40e_set_queue_region(struct i40e_hw *hw, struct i40e_pf *pf, > + struct rte_i40e_rss_region_conf *conf_ptr) > +{ > + uint32_t TCREGION, TC_OFFSET, TC_SIZE; Please follow DPDK coding style guide and use only low case for variables n= ames.=20 > + uint16_t TC_SIZE_TB[7] =3D {1, 2, 4, 8, 16, 32, 64}; > + uint16_t i, index; > + uint16_t main_vsi_seid =3D pf->main_vsi_seid; >=20 > /** > @@ -146,6 +159,19 @@ struct rte_pmd_i40e_ptype_mapping { > }; >=20 > /** > + * Queue region information get from CLI. > + */ > +struct rte_i40e_rss_region_conf { > + uint8_t region_id; > + uint8_t flowtype; As this is internal i40e flow type (PCTYPE), it is better name it hw_flowty= pe. As an option - use RTE level sw_flowtype and map it to internal hw_flow= type using corresponding i40e API. > + uint8_t queue_startIndex; > + uint8_t queue_num; > + uint8_t UserPriority; Low case for naming. > + uint8_t TrafficClasses; > + enum rte_pmd_i40e_queue_region_op op; > +}; > + > +/** > * Notify VF when PF link status changes. > * > * @param port > @@ -637,4 +663,17 @@ int rte_pmd_i40e_ptype_mapping_replace(uint8_t > port, > uint8_t mask, > uint32_t pkt_type); >=20 > +/** > + * Get RSS queue region info from CLI and do configuration for > + * that port as the command otion type > + * > + * @param port > + * pointer to port identifier of the device > + * @param conf_ptr > + * pointer to the struct that contain all the > + * region configuration parameters > + */ > +int rte_pmd_i40e_queue_region_conf(uint8_t port, > + struct rte_i40e_rss_region_conf *conf_ptr); > + > #endif /* _PMD_I40E_H_ */ > diff --git a/drivers/net/i40e/rte_pmd_i40e_version.map > b/drivers/net/i40e/rte_pmd_i40e_version.map > index 20cc980..77ac385 100644 > --- a/drivers/net/i40e/rte_pmd_i40e_version.map > +++ b/drivers/net/i40e/rte_pmd_i40e_version.map > @@ -45,3 +45,10 @@ DPDK_17.08 { > rte_pmd_i40e_get_ddp_info; >=20 > } DPDK_17.05; > + > +DPDK_17.11 { > + global: > + > + rte_pmd_i40e_queue_region_conf; > + > +} DPDK_17.08; > -- > 2.9.3