From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH] net/mlx5: add supported hash function check Date: Wed, 4 Apr 2018 09:35:20 +0200 Message-ID: <20180404073520.keyha77wi4mzxpgw@laranjeiro-vm.dev.6wind.com> References: <20180318073720.84176-1-xuemingl@mellanox.com> <20180319082949.6wezkieapgbn3dny@laranjeiro-vm.dev.6wind.com> <20180326113941.lhlvg4pe2aiccbld@laranjeiro-vm.dev.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Adrien Mazarguil , Shahaf Shuler , "dev@dpdk.org" To: "Xueming(Steven) Li" Return-path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 646621BC49 for ; Wed, 4 Apr 2018 09:35:17 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id l49so20991759wrl.4 for ; Wed, 04 Apr 2018 00:35:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Apr 02, 2018 at 12:41:33PM +0000, Xueming(Steven) Li wrote: > > 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()? I mean, if others PMD are ignoring non supported values, but only using what they support, this PMD should do the same. > From quick view of ixgbe code, kind of try best, would like to hear from > other PMDs on how this interpreted. Don't expect other maintainers to answer you if you don't ask them directly. > > -----Original Message----- > > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com] > > Sent: Monday, March 26, 2018 7:40 PM > > To: Xueming(Steven) Li > > Cc: Adrien Mazarguil ; Shahaf Shuler > > ; dev@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 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@6wind.com] > > > > Sent: Monday, March 19, 2018 4:30 PM > > > > To: Xueming(Steven) Li > > > > Cc: Adrien Mazarguil ; Shahaf Shuler > > > > ; dev@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 > > > > > --- > > > > > 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 -- Nélio Laranjeiro 6WIND