From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=62zoVJsuJraTcp+ObhB69sNH8L2D3551KSypC+Yk6hA=; b=RO1s+2DrqbOO9kmifRRu+MepThXVFEwyylepxkOhthp3GeVFoKbL7H4aRIg1hQm2mX Qu0rHXNSbTPina1fUSm36EweNpcnQz8sq/lPIM/4CRcRz6dIF/BQ9trXp+OheDq71SRB dIIC9cHxs7yiqKnUpdEdR8cz1dh91TjVhLFccdLsILIt3JKxYES5lCoi24e43grTDmg3 DGZiaQtDyYJmZgJDzof8lRFaZzGt7eRBq5wgEzTXmganmUpxeD7a1AqNbzZxVJVGejHo JGsbCG7Yhn6KDgRY+2/D5JtcM2dmf+pR/9ghh0YD64N9anyuxN7KrmYkvPTwQcPgG4IP JEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=62zoVJsuJraTcp+ObhB69sNH8L2D3551KSypC+Yk6hA=; b=YbP4VcSYXXCFGrJy1Ws89OX6+MH3cReTPGDf0TTiXT4ruevskcg8HBVHLCNjBfn6Rh D1GF9w82QucsmZJeyCW5JX2PrQrdzuI2CmnDtZiQ6AGfHndPU7bbUuOP5BfNUimooN3O 26E1ar9h8u3BFzRdhEa5PhU/9nLLkoAsn8e/9J9XAEmaCW2ZWp3YhwtFNsw+hxCdS/H9 R5tR01keP6XN6dmCTsczE6PQicyJkbuE6oNdHWzJStXgN5+vEpHT6zvl76FRrFSajWsd jqNaf+vjbCf23CLfFNfQZZhwuhm90KFXZklqkSWEmQzucvYz8EMR63sG9yuVuvCFB4fw 0ZQg== X-Gm-Message-State: AElRT7GR3u5dkzPi0sX2WC47nF74hAJhlWrJnmyV385JAAK96qbIrQ30 S4oOEexlbK3q6+E6/5FFqVC/ X-Google-Smtp-Source: AIpwx49PjqM+pJLP1apXj+17hCiN+vQs0Pi9nB6N834w2yiPOeWAbX4zLpyxf2qDhpJ8s16mRXJWJw== X-Received: by 10.223.225.210 with SMTP id l18mr12985872wri.251.1522827317044; Wed, 04 Apr 2018 00:35:17 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id b34sm10450698wra.21.2018.04.04.00.35.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Apr 2018 00:35:16 -0700 (PDT) Date: Wed, 4 Apr 2018 09:35:20 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: "Xueming(Steven) Li" Cc: Adrien Mazarguil , Shahaf Shuler , "dev@dpdk.org" 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] net/mlx5: add supported hash function check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2018 07:35:17 -0000 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