From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 31AFF7D0D for ; Wed, 18 Apr 2018 15:26:13 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id v60-v6so4840549wrc.7 for ; Wed, 18 Apr 2018 06:26:13 -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:in-reply-to; bh=eiGGEPKOY4aNRiPVALJ0spTQGvgv6E+OsbMarHMkDhg=; b=CIorXqGYrTt07iyq2nYWjrjZTzU/RBRuqt+1vca2UsUoiXAzAJVSdYyqb66lnr8fhz 7QSqyR2K/s/iYE15AXLUI9d4s8t2BGgmK06gDh51bHQmMDFv0ecGieo0au1DgTHcLSI4 zEl444glYxP+9mkrnlwM28xJT16DMxg+9Vfz0ed+MaLEwruqk2+i0lNZfHfAvP+9Fox+ LADV4KU9nS9VOuQ/AEpqaF8o05ZRmvSPlpQg0n1pKfl7XqkhvsnbnQZEMGe70mCtUUAS uava7sbUkZrd8T9hwRozEbYim3WEnt8FnWBDRxps3/k1bUMVZFnpaJ3EjLfV8CX3sSc8 JYXA== 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:in-reply-to; bh=eiGGEPKOY4aNRiPVALJ0spTQGvgv6E+OsbMarHMkDhg=; b=lR5THemsbTZZxT+5jAeCs00t0kU9kgF3f6VJuy6+rd3HWo8tZR9rdfJoCjaq/aZn8K cUuYqtn/oxe1Rmr99tUTqSDJDIkOVbGrXmoAVvAkSHMNu5YR9zfTPKJ7qnJ3yAPM7dpU JfcSp8JaO3gVD+GYXXQaWsCbcCaablluAM0il7GdMCVMz0NWnijFWT+0sih6/EKLLsvR jGCRLSd0J34kEewwTxF6OQCMtSE1zFBhumvr5bfH35m/dttW9cFRSQ4aUwQF85UwdlSq 4ARIsiuJ08ifmFM5si0wI2aiPgkiKJPrgEzT7psi6NBp6ChfwxlDXTjpDEA0gMSmceXh l/5w== X-Gm-Message-State: ALQs6tDyu6zRJD52mObkiqhG5WdcFHyXzHhiPhLAGn9w700W9Ak5AclY gILadtvX0N4MinQa5B+nsKk5NA== X-Google-Smtp-Source: AIpwx48scQi9gWox6NKtJ7QzaZgTYxkOtRQprLhbPNUv+PgQZTYYjjD0JLqBfr9ybm4xvLGy/Ee/yw== X-Received: by 10.28.155.206 with SMTP id d197mr1892897wme.44.1524057972084; Wed, 18 Apr 2018 06:26:12 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id f15-v6sm1603310wrh.35.2018.04.18.06.26.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 06:26:11 -0700 (PDT) Date: Wed, 18 Apr 2018 15:25:57 +0200 From: Adrien Mazarguil To: Xueming Li Cc: Shahaf Shuler , Nelio Laranjeiro , Wenzhuo Lu , Jingjing Wu , Thomas Monjalon , dev@dpdk.org Message-ID: <20180418132557.GP4957@6wind.com> References: <20180409121035.148813-1-xuemingl@mellanox.com> <20180418110648.22883-2-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418110648.22883-2-xuemingl@mellanox.com> Subject: Re: [dpdk-dev] [PATCH v3 2/2] app/testpmd: only config supported RSS hash types 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, 18 Apr 2018 13:26:14 -0000 Hi Xueming, On Wed, Apr 18, 2018 at 07:06:48PM +0800, Xueming Li wrote: > "port config all rss all" command will fail on PMD that not support any > of hard coding RSS hash types. This patch changed hard coding hash types > to supported types retrieved from device info. > > Signed-off-by: Xueming Li Problem is that this patch removes the ability to request "all" RSS types regardless of PMD support. Users will expect "all" to behave as documented, however doing so will only result in the limited set of types reported by PMDs. For instance at least mlx4 doesn't update the flow_type_rss_offloads field since it has never implemented configuration support for the legacy RSS API. You should add an argument with a different name (e.g. "supported" or "default") for that and keep the original meaning for "all". Testpmd documentation has to be updated accordingly. One more nit below. > --- > app/test-pmd/cmdline.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 512e3b55e..d357de7e6 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -1998,6 +1998,7 @@ cmd_config_rss_parsed(void *parsed_result, > { > struct cmd_config_rss *res = parsed_result; > struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, }; > + struct rte_eth_dev_info dev_info = {0}; This could be declared in the new block where it's used. Also note that "{0}" is nonstandard syntax, use memset() or initialize a field like rss_key_len above. > int diag; > uint8_t i; > > @@ -2034,6 +2035,12 @@ cmd_config_rss_parsed(void *parsed_result, > } > rss_conf.rss_key = NULL; > for (i = 0; i < rte_eth_dev_count(); i++) { > + if (!strcmp(res->value, "all")) { > + rte_eth_dev_info_get(i, &dev_info); > + if (dev_info.flow_type_rss_offloads) > + rss_conf.rss_hf = > + dev_info.flow_type_rss_offloads; > + } > diag = rte_eth_dev_rss_hash_update(i, &rss_conf); > if (diag < 0) > printf("Configuration of RSS hash at ethernet port %d " > -- > 2.13.3 > -- Adrien Mazarguil 6WIND