From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 02/10] net/enic: allow the user to change RSS settings Date: Fri, 9 Mar 2018 14:35:02 +0000 Message-ID: <97aef536-8d73-7269-3897-a6aee26f3a63@intel.com> References: <20180306014634.28398-2-johndale@cisco.com> <20180308024702.25974-1-johndale@cisco.com> <20180308024702.25974-3-johndale@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Hyong Youb Kim To: John Daley 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) In-Reply-To: <20180308024702.25974-3-johndale@cisco.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.