[dpdk-dev] [PATCH] net/mlx5: add supported hash function check

Xueming(Steven) Li xuemingl at mellanox.com
Mon Apr 2 14:41:33 CEST 2018


> this device should to the same instead of refusing it

Just double confirm, is it "do the same"? are you suggesting not denying
unsupported hash function in rte_eth_dev_configure()? 

From quick view of ixgbe code, kind of try best, would like to hear from 
other PMDs on how this interpreted. 

> -----Original Message-----
> From: Nélio Laranjeiro [mailto:nelio.laranjeiro at 6wind.com]
> Sent: Monday, March 26, 2018 7:40 PM
> To: Xueming(Steven) Li <xuemingl at mellanox.com>
> Cc: Adrien Mazarguil <adrien.mazarguil at 6wind.com>; Shahaf Shuler
> <shahafs at mellanox.com>; dev at dpdk.org
> Subject: Re: [PATCH] net/mlx5: add supported hash function check
> 
> On Thu, Mar 22, 2018 at 10:42:44AM +0000, Xueming(Steven) Li wrote:
> > Just remind, denying unsupported hash function in
> > rte_eth_dev_configure() might impact some user app using PMD that simply
> ignoring them silently.
> 
> If the default behavior from other devices is to use only possible values,
> this device should to the same instead of refusing it.
> 
> > Testpmd command "port config <port> rss all" should be updated as well
> > to 'all' supported values from rte_eth_dev_info, I'll include this
> > change in next version.
> >
> > > -----Original Message-----
> > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro at 6wind.com]
> > > Sent: Monday, March 19, 2018 4:30 PM
> > > To: Xueming(Steven) Li <xuemingl at mellanox.com>
> > > Cc: Adrien Mazarguil <adrien.mazarguil at 6wind.com>; Shahaf Shuler
> > > <shahafs at mellanox.com>; dev at dpdk.org
> > > Subject: Re: [PATCH] net/mlx5: add supported hash function check
> > >
> > > 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
> 
> --
> Nélio Laranjeiro
> 6WIND


More information about the dev mailing list