[dpdk-dev] [PATCH v3 02/10] net/enic: allow the user to change RSS settings

Ferruh Yigit ferruh.yigit at intel.com
Fri Mar 9 15:35:02 CET 2018


On 3/8/2018 2:46 AM, John Daley wrote:
> From: Hyong Youb Kim <hyonkim at cisco.com>
> 
> 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 <hyonkim at cisco.com>
> Reviewed-by: John Daley <johndale at cisco.com>

<...>

> @@ -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.



More information about the dev mailing list