Please see comments inline > -----Original Message----- > From: Ophir Munk > Sent: Friday, November 02, 2018 7:55 PM > To: dev@dpdk.org; Yongseok Koh <ys...@mellanox.com> > Cc: Thomas Monjalon <tho...@monjalon.net>; Asaf Penso > <as...@mellanox.com>; Olga Shern <ol...@mellanox.com>; Ophir Munk > <ophi...@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 <ophi...@mellanox.com>; dev@dpdk.org; Yongseok Koh > > <ys...@mellanox.com> > > Cc: Thomas Monjalon <tho...@monjalon.net>; Olga Shern > > <ol...@mellanox.com>; Asaf Penso <as...@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.