From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 56F094F93 for ; Mon, 26 Mar 2018 13:41:08 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id i75so14738962wmf.0 for ; Mon, 26 Mar 2018 04:41:08 -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=ZDa9rm8FaAKmCo4Cz0iMEikC0fUEtXeWBLglld4mips=; b=MGaTINU5Oe0B0d4BvXjF/4hhLGn30P2uI46jCTP97NHa081wdw6SkWulU82KPJfL2G BXUSPD0i6gGjX4vCcC+9lzm52MAXSGeXOW0CEYZEjk5GSQ9NDGqoDJg0tWytOUnibmir vHFwWlLfIRSTDUaenxdpXYXa+1xvNpwNTrhrhdOlTowIVZETzJxvByOX6D9jXIyMXjwF 7tO9p7ZumJPDl22B+s3rocBPuTJvrZPR8UHwh7K79U/LzOlh5A31g8VW1dQ9jAzzupxQ JCd3hD/Wrv7MO9qS7Stnr8NxAjRBk89ukPNy/MY3DjjA2qKFgssMw/6aAtmpGlDDSYow t8Bw== 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=ZDa9rm8FaAKmCo4Cz0iMEikC0fUEtXeWBLglld4mips=; b=GAf26sWIeVzxUNL/gI4QC+vrxd86nHOHXWtAvFUqjvL0AVLtDLRWUqcbg+kBAhJyn1 xk8xciOxFWYo3LzN9aHfaylzO9/PFxYqERBBQ1TjbCcpbuU4SqtOCj3RcKmg81HCU8bA b+yxeZ3GYaIXZ1d6J9KxwsLHsRhbevqCktIF0wYLd8kq2a6QCsSaazjIO8/yg90fSZ1c TCKnOAkxmwxOYSAHiW6TWXHquk9X1iharbOHMr0OKQ7s+vt+CVwA23bECDBNpA5y6rCA 4GJw85D7uVlO3+boQR7TGPl8zGXqKkAcL4WdN+VMmp9aqwK4+MhNieZsDRhBNmB8pi0s XFEw== X-Gm-Message-State: AElRT7EDreQRl0FYnjn9siTcaXlhsgumAM8cSbbp6yB+QC4045AySLaa zXMSm5+c+6cSCr2Z5Kd2GIiD X-Google-Smtp-Source: AG47ELsNFREkvWJNZVjoKFEpSp7U4MEsej10gLX7QtiaZHYbfMbJ4tYuE9L1kIBbskJ6kyY5k1iMeg== X-Received: by 10.28.131.134 with SMTP id f128mr14366767wmd.55.1522064467952; Mon, 26 Mar 2018 04:41:07 -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 k14sm21722046wrc.62.2018.03.26.04.41.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Mar 2018 04:41:07 -0700 (PDT) Date: Mon, 26 Mar 2018 13:39:41 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: "Xueming(Steven) Li" Cc: Adrien Mazarguil , Shahaf Shuler , "dev@dpdk.org" Message-ID: <20180326113941.lhlvg4pe2aiccbld@laranjeiro-vm.dev.6wind.com> References: <20180318073720.84176-1-xuemingl@mellanox.com> <20180319082949.6wezkieapgbn3dny@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: Mon, 26 Mar 2018 11:41:08 -0000 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