From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 61AF7A0548 for ; Fri, 10 Sep 2021 11:51:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E48D41104; Fri, 10 Sep 2021 11:51:38 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 1059A406B4; Fri, 10 Sep 2021 11:51:36 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 4F8C17F523; Fri, 10 Sep 2021 12:51:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 4F8C17F523 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1631267495; bh=EqmfHx05HOBSestgTAkir5uFZLHuYeHhXfgZPTUP+N8=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=fgbNM6whhaET4SGBWEz9hLYdCP9l4WJhkUfpWf5S3LB5e9jLrdpAWB0S1np2ZL6DD //n78ARWHT9tgBc4NMyEZ3JPs1R5od4Eq9MA7R6HWrhp0FmK8SRik/4HaDLNkaG5av aZNn8XCTH10Tl675xjgvCyI2h3U38PSnQttEy8BA= To: Maxime Coquelin , dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com, david.marchand@redhat.com, ferruh.yigit@intel.com, michaelba@nvidia.com, viacheslavo@nvidia.com Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com References: <20210910091734.7023-1-maxime.coquelin@redhat.com> <20210910091734.7023-3-maxime.coquelin@redhat.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Fri, 10 Sep 2021 12:51:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210910091734.7023-3-maxime.coquelin@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH 2/3] app/testpmd: fix RSS hash type update X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 9/10/21 12:17 PM, Maxime Coquelin wrote: > port_rss_hash_key_update() initializes rss_conf with the > RSS hash type and key provided by the user, but it calls > rte_eth_dev_rss_hash_conf_get() before calling > rte_eth_dev_rss_hash_update(), which overides the parsed > config with current NIC's config. > > While the RSS key value is set again after, this is not > the case of the key length and the type of hash. > > There is no need to read the RSS config from the NIC, let's > just try to set the user defined one. > > Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands") > Cc: stable@dpdk.org > Cc: nelio.laranjeiro@6wind.com > > Signed-off-by: Maxime Coquelin > --- > app/test-pmd/config.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 31d8ba1b91..451bda53b1 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -2853,18 +2853,14 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, > int diag; > unsigned int i; > > - rss_conf.rss_key = NULL; > + rss_conf.rss_key = hash_key; > rss_conf.rss_key_len = hash_key_len; > rss_conf.rss_hf = 0; > for (i = 0; rss_type_table[i].str; i++) { > if (!strcmp(rss_type_table[i].str, rss_type)) > rss_conf.rss_hf = rss_type_table[i].rss_type; > } > - diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf); > - if (diag == 0) { > - rss_conf.rss_key = hash_key; > - diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf); > - } > + diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf); I'm not 100% sure, but I'd say the intent above could be to update key only as the function name says. I.e. keep rss_hf as is. That could be the reason to get first.