[dpdk-dev] [PATCH v2] net/mlx5: set RSS key to NULL to indicate default RSS

Ophir Munk ophirmu at mellanox.com
Sat Nov 3 18:18:13 CET 2018


Please see comments inline

> -----Original Message-----
> From: Ophir Munk
> Sent: Friday, November 02, 2018 7:55 PM
> To: dev at dpdk.org; Yongseok Koh <yskoh at mellanox.com>
> Cc: Thomas Monjalon <thomas at monjalon.net>; Asaf Penso
> <asafp at mellanox.com>; Olga Shern <olgas at mellanox.com>; Ophir Munk
> <ophirmu at mellanox.com>
> Subject: FW: [PATCH v2] net/mlx5: set RSS key to NULL to indicate default
> RSS
> 
> 
> > -----Original Message-----
> > From: Shahaf Shuler
> > Sent: Thursday, November 01, 2018 4:01 PM
> > To: Ophir Munk <ophirmu at mellanox.com>; dev at dpdk.org; Yongseok Koh
> > <yskoh at mellanox.com>
> > Cc: Thomas Monjalon <thomas at monjalon.net>; Olga Shern
> > <olgas at mellanox.com>; Asaf Penso <asafp at mellanox.com>
> > Subject: RE: [PATCH v2] net/mlx5: set RSS key to NULL to indicate
> > default RSS
> >
> > Hi Ophir,
> >
> 
> >
> > > +	if (rss->key_len == 0 && rss->key != NULL)
> > > +		return rte_flow_error_set(error, ENOTSUP,
> > > +
> > > RTE_FLOW_ERROR_TYPE_ACTION_CONF,
> > > +					  &rss->key_len,
> > > +					  "RSS hash key length 0");
> > > +	if (rss->key_len > 0 && rss->key_len < MLX5_RSS_HASH_KEY_LEN)
> >
> > Can't you simplify using a single condition:
> > If (rss->key && rss->key_len < MLX5_RSS_HASH_KEY_LEN)
> >
> 
> Do you mean that if key==NULL we do not care about the key_len?
> (since if key==NULL key_len can have any value?
> Wil update in V3

After applying in v3 the reviewed condition code - action validation confirms a NULL key with key length 6.
But then testpmd crashes when creating the rule. Crash occurs in rte_flow_conv_action_conf().
When reverting to v2 condition code action validation is failing (as expected) with error message:
Caught error type 15 (action configuration): cause: 0x7fffffffbf18, RSS hash key too small: Unknown error 95
and flow creation fails with the same error.

I will issue v4 with v2  condition code.

> 
> > Same rss->key addition should be for the case the key_len is too large.


More information about the dev mailing list