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 D980DA0A0C; Fri, 9 Jul 2021 11:27:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 343524014D; Fri, 9 Jul 2021 11:27:10 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 2C6C940143; Fri, 9 Jul 2021 11:27:09 +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 A61E87F4FD; Fri, 9 Jul 2021 12:27:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru A61E87F4FD DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1625822828; bh=wyC0hivRHhYKoFsfF8LoZUlr6QFKT5GJNiGD0v+ZET0=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=HOQf25T70M3k+JNiaCtRYfrMrb8Y4a/EEneu6ijVztawWfo5y+mznBom1abW559SJ xB9BlmEsCO+lMhW4AONCLOsWx/6lT2gakwqG0DpST/d7seeIyNaSXo3xHo3K4SzYHV Aw6BDeEBFgVhe5ovTI6zSFp3NFh9pP4VUianHNJA= To: Jie Wang , dev@dpdk.org Cc: xiaoyun.li@intel.com, stable@dpdk.org References: <20210709155717.103425-1-jie1x.wang@intel.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <987e1c1b-a695-a8ce-1ee3-da87c9612415@oktetlabs.ru> Date: Fri, 9 Jul 2021 12:27:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210709155717.103425-1-jie1x.wang@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd doesn't show RSS hash offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 7/9/21 6:57 PM, Jie Wang wrote: > This patch reapply Rx/Tx offloads configuration for all ports > after the program configuring the device port. When the program > configures the ports, the default Rx/Tx offloads are modified. > > So it is need to reapply Rx/Tx offloads configuration before > testpmd showing offloads. > > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") > Cc: stable@dpdk.org > > Signed-off-by: Jie Wang > --- > app/test-pmd/testpmd.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 1cdd3cdd12..7089ae216d 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2475,6 +2475,9 @@ start_port(portid_t pid) > } > > if (port->need_reconfig > 0) { > + const struct rte_eth_dev *dev = &rte_eth_devices[pi]; > + int k; > + > port->need_reconfig = 0; > > if (flow_isolate_all) { > @@ -2508,6 +2511,18 @@ start_port(portid_t pid) > port->need_reconfig = 1; > return -1; > } > + > + /* Apply TxRx configuration for all ports */ > + port->dev_conf.txmode = dev->data->dev_conf.txmode; > + port->dev_conf.rxmode = dev->data->dev_conf.rxmode; > + /* Apply Rx offloads configuration */ > + for (k = 0; k < port->dev_info.max_rx_queues; k++) > + port->rx_conf[k].offloads = > + port->dev_conf.rxmode.offloads; > + /* Apply Tx offloads configuration */ > + for (k = 0; k < port->dev_info.max_tx_queues; k++) > + port->tx_conf[k].offloads = > + port->dev_conf.txmode.offloads; Does testpmd really require these copies? May be the right fix is to get rid of these copies at all and show actual information from data->dev_conf ?