From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 5C0F5FEB for ; Mon, 19 Mar 2018 09:30:46 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id r82so3251006wme.0 for ; Mon, 19 Mar 2018 01:30:46 -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=1i1aBf+bU6YAwARaTxGNN5h7rvP0xGa8kjXt1/J1HiQ=; b=NYJyJoBqaNwhUvSI4yHPsUfUWYnsabOy/wTuFNaKihbrqGAD50kyQQuQXUFL1MN7Le ios6fFCDAi/m97nNPh4QE3JwyAHSug+deCVUgj/TGiJWqhNjTeokCcKRpB5PAmkF3CYm ndMf1toboPfx+eSi6JWFDUvi2u40JK/VA9x/HVhpwR8FEORZ7MdIxozCrSYv2B5EqsXr UNHxmDX5MJgpCf3hdjUZ+4djVA9J+ct2i5B/Ij7HvM7ABYn+0UuARhppi13bR/bA5oEi Jkhs/l/YGci16NxSgg4wALX1BvPRst6f7ggLpXgF99PUmQH5SlIIdxAUpLcR/hyAd2Vl DfTQ== 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=1i1aBf+bU6YAwARaTxGNN5h7rvP0xGa8kjXt1/J1HiQ=; b=mV/Rf/UFwjs3S+3eYorvj6lNAG+Z0hElBN0Q33oPZK0B8oqbUB7ceOVCCKfzwNl+cf otpr7jNwtVMTnWUNdmvZ31ADVDQz+acbbUELGA9wU+d9v/BnLl2SWqeAXqOiWWsGwEjl fhAgY9s9m8HQ8XwQVn5z49ywvwfBylKdyLzuM8L0eboqO4AeLcVKo+JRkkf+SJhiIZ55 jXAupakBxeqt+xJ7n0UWq8f3q0t6oVq7h2LJ7mFCqn0mq2PJPF9JLSnA1qcY51SCgySz PNq+HgzvFCWxsOnDLxb9/U3FNkaGYl1qG4CI9DzAqL/qCfH6+k7qiuCbykMCZBlsOsi4 WK6A== X-Gm-Message-State: AElRT7F1f/X6tLxr0Ou/uIwVdoMsrkGxW3fnPkE5cCZNcDqMv8o+RXKy mL01IBhFEHn8m9rKgGHFkAWZ X-Google-Smtp-Source: AG47ELupmeSOWjAo9eCBDo2w7O7QNHbC/aPzuERa+rqJDLJDlQEDYXIE+Lvv5WIvpQjp09ad5c+gXQ== X-Received: by 10.28.3.68 with SMTP id 65mr7865841wmd.17.1521448246018; Mon, 19 Mar 2018 01:30:46 -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 m184sm10336643wme.40.2018.03.19.01.30.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Mar 2018 01:30:45 -0700 (PDT) Date: Mon, 19 Mar 2018 09:29:49 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Xueming Li Cc: Adrien Mazarguil , Shahaf Shuler , dev@dpdk.org Message-ID: <20180319082949.6wezkieapgbn3dny@laranjeiro-vm.dev.6wind.com> References: <20180318073720.84176-1-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180318073720.84176-1-xuemingl@mellanox.com> 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, 19 Mar 2018 08:30:46 -0000 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