[dpdk-dev] [PATCH] net/mlx5: add supported hash function check
Nélio Laranjeiro
nelio.laranjeiro at 6wind.com
Mon Mar 19 09:29:49 CET 2018
On Sun, Mar 18, 2018 at 03:37:20PM +0800, Xueming Li wrote:
> Add supported RSS hash function check in device configuration to
> have better error verbosity for application developers.
>
> Signed-off-by: Xueming Li <xuemingl at mellanox.com>
> ---
> drivers/net/mlx5/mlx5_ethdev.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
> index b73cb53..175a1ff 100644
> --- a/drivers/net/mlx5/mlx5_ethdev.c
> +++ b/drivers/net/mlx5/mlx5_ethdev.c
> @@ -346,6 +346,14 @@ struct ethtool_link_settings {
> rx_offloads, supp_rx_offloads);
> return ENOTSUP;
> }
> + if (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf &
> + MLX5_RSS_HF_MASK) {
> + ERROR("Some RSS hash function not supported "
> + "requested 0x%" PRIx64 " supported 0x%" PRIx64,
> + dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf,
> + (uint64_t)(~MLX5_RSS_HF_MASK));
> + return ENOTSUP;
> + }
> if (use_app_rss_key &&
> (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len !=
> rss_hash_default_key_len)) {
> --
> 1.8.3.1
>
I would answer than an application should not try to configure something
not advertise by the device.
This information is present in struct rte_eth_dev_info returned by
mlx5_dev_infos_get() and thus the devops of the device.
Seems rte_eth_dev_configure() should be fixed to avoid configuring wrong
values.
Regards,
--
Nélio Laranjeiro
6WIND
More information about the dev
mailing list