From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DB86B107A for ; Fri, 29 Sep 2017 14:22:53 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2017 05:22:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,452,1500966000"; d="scan'208";a="133544924" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 29 Sep 2017 05:22:52 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Sep 2017 05:22:52 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Sep 2017 05:22:51 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Fri, 29 Sep 2017 20:22:49 +0800 From: "Wu, Jingjing" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "Zhao1, Wei" Thread-Topic: [dpdk-dev] [PATCH v7 1/2] net/i40e: queue region set and flush Thread-Index: AQHTOQVHTPf+7Lh0xUKgOuyudyFJ96LLxlXg Date: Fri, 29 Sep 2017 12:22:49 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810E83C80@SHSMSX103.ccr.corp.intel.com> References: <1506672718-39160-1-git-send-email-wei.zhao1@intel.com> <1506676584-41030-1-git-send-email-wei.zhao1@intel.com> <1506676584-41030-2-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1506676584-41030-2-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzg4NTkxZWQtMmM3YS00YjEyLTliNzItNjliODZlNTUwYzkxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjhRZ1lJdXlmd2dScFlOZTl1ZU1leE9ZZ25uSDRHZU94WjRFY3VRcnlRR3c9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 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 v7 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, 29 Sep 2017 12:22:54 -0000 > + /* update the local VSI info with updated queue map */ > + (void)rte_memcpy(&vsi->info.tc_mapping, &ctxt.info.tc_mapping, > + sizeof(vsi->info.tc_mapping)); > + (void)rte_memcpy(&vsi->info.queue_mapping, > + &ctxt.info.queue_mapping, > + sizeof(vsi->info.queue_mapping)); (void) can be omitted. [......] > +static int > +i40e_queue_region_display_all_info(struct i40e_pf *pf, uint16_t port_id) > +{ Not only the function name changes from "get info" to "display info". You m= ay also need to change the command name. But, what I like is changing the keep the "get", but change the function to return the a struct which contains the info, and user can call it. Other= wise it is only used for show. [.....] > +enum rte_pmd_i40e_queue_region_op { > + RTE_PMD_I40E_REGION_UNDEFINED, > + RTE_PMD_I40E_QUEUE_REGION_SET, /**< add queue region set */ > + RTE_PMD_I40E_REGION_FLOWTYPE_SET, /**< add pf region pctype set */ > + /*** add queue region user priority set */ I think you missed my comments in last mail. NOT "***" but "**", please rea= d http://www.dpdk.org/doc/guides/contributing/documentation.html#doxygen-guid= elines > + RTE_PMD_I40E_USER_PRIORITY_REGION_SET, > + /** > + * ALL configuration about queue region from up layer > + * at first will only keep in DPDK softwarestored in driver, > + * only after " FLUSH_ON ", it commit all configuration to HW. > + * Because PMD had to set hardware configuration at a time, so > + * it will record all up layer command at first. > + */ > + RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_ON, > + /** > + * "FLUSH_OFF " is just clean all configuration about queue > + * region just now, and restore all to DPDK i40e driver default > + * config when start up. > + */ > + RTE_PMD_I40E_RSS_QUEUE_REGION_ALL_FLUSH_OFF, > + RTE_PMD_I40E_RSS_QUEUE_REGION_INFO_GET, > + RTE_PMD_I40E_QUEUE_REGION_OP_MAX > +}; > + > #define RTE_PMD_I40E_DDP_NAME_SIZE 32 >=20 > /** > @@ -146,6 +173,27 @@ struct rte_pmd_i40e_ptype_mapping { > }; >=20 > /** > + * Queue region related information. > + */ > +struct rte_i40e_rss_region_conf { > + /*** the region id for this configuration */ > + uint8_t region_id; > + /** the pctype or hardware flowtype of packet, > + * the specific index for each type has been defined > + * in file i40e_type.h as enum i40e_filter_pctype. > + */ > + uint8_t hw_flowtype; > + /*** the start queue index for this region */ > + uint8_t queue_start_index; > + /*** the total queue number of this queue region */ > + uint8_t queue_num; > + /*** the packet's user priority for this region */ > + uint8_t user_priority; > + /*** Option types of queue region */ > + enum rte_pmd_i40e_queue_region_op op; The same *** -> ** Thanks Jingjing