From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id CA5315F2C for ; Fri, 9 Mar 2018 15:35:05 +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 fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2018 06:35:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,445,1515484800"; d="scan'208";a="181328563" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.62]) ([10.237.221.62]) by orsmga004.jf.intel.com with ESMTP; 09 Mar 2018 06:35:03 -0800 To: John Daley Cc: dev@dpdk.org, Hyong Youb Kim References: <20180306014634.28398-2-johndale@cisco.com> <20180308024702.25974-1-johndale@cisco.com> <20180308024702.25974-3-johndale@cisco.com> From: Ferruh Yigit Message-ID: <97aef536-8d73-7269-3897-a6aee26f3a63@intel.com> Date: Fri, 9 Mar 2018 14:35:02 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180308024702.25974-3-johndale@cisco.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 02/10] net/enic: allow the user to change RSS settings 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, 09 Mar 2018 14:35:06 -0000 On 3/8/2018 2:46 AM, John Daley wrote: > From: Hyong Youb Kim > > Currently, when more than 1 receive queues are configured, the driver > always enables RSS with the driver's own default hash type, key, and > RETA. The user is unable to change any of the RSS settings. Address > this by implementing the ethdev RSS API as follows. > > Correctly report the RETA size, key size, and supported hash types > through rte_eth_dev_info. > > During dev_configure(), initialize RSS according to the device's > mq_mode and rss_conf. Start with the default RETA, and use the default > key unless a custom key is provided. > > Add the RETA and rss_conf query/set handlers to let the user change > RSS settings after the initial configuration. The hardware is able to > change hash type, key, and RETA individually. So, the handlers change > only the affected settings. > > Refactor/rename several functions in order to make their intentions > clear. For example, remove all traces of RSS from > enicpmd_vlan_offload_set() as it is confusing. > > Signed-off-by: Hyong Youb Kim > Reviewed-by: John Daley <...> > @@ -889,44 +889,42 @@ static int enic_dev_open(struct enic *enic) > return err; > } > > -static int enic_set_rsskey(struct enic *enic) > +static int enic_set_rsskey(struct enic *enic, uint8_t *user_key) > { > dma_addr_t rss_key_buf_pa; > union vnic_rss_key *rss_key_buf_va = NULL; > - static union vnic_rss_key rss_key = { > - .key = { > - [0] = {.b = {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}}, > - [1] = {.b = {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}}, > - [2] = {.b = {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}}, > - [3] = {.b = {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}}, > - } > - }; > - int err; > + int err, i; > u8 name[NAME_MAX]; > > + RTE_ASSERT(use_key != NULL); there is a typo, "use_key" should be "user_key" which is causing a build error. If RTE_ASSERT used in the code, should test enabling CONFIG_RTE_ENABLE_ASSERT option too.