From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68669A04B1; Wed, 23 Sep 2020 09:51:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 245931C220; Wed, 23 Sep 2020 09:51:53 +0200 (CEST) Received: from incedge.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id 34EA71C215 for ; Wed, 23 Sep 2020 09:51:52 +0200 (CEST) X-ASG-Debug-ID: 1600847510-149d111bae1fef40001-TfluYd Received: from mail.chinasoftinc.com ([10.168.0.51]) by incedge.chinasoftinc.com with ESMTP id fUoLaXj2X2Zyoxp4 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Sep 2020 15:51:50 +0800 (CST) X-Barracuda-Envelope-From: huwei013@chinasoftinc.com X-Barracuda-RBL-Trusted-Forwarder: 10.168.0.51 X-ASG-Whitelist: Client Received: from localhost.localdomain (120.133.139.157) by INCCAS001.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Wed, 23 Sep 2020 15:51:50 +0800 From: "Wei Hu (Xavier)" X-Barracuda-RBL-Trusted-Forwarder: 10.168.0.60 To: , , , CC: , , Date: Wed, 23 Sep 2020 15:51:34 +0800 X-ASG-Orig-Subj: [PATCH v2] app/testpmd: update Rx RSS HASH offload when setting MQ RSS Message-ID: <20200923075134.24168-1-huwei013@chinasoftinc.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20200908021603.44862-1-huwei013@chinasoftinc.com> References: <20200908021603.44862-1-huwei013@chinasoftinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [120.133.139.157] X-Barracuda-Connect: UNKNOWN[10.168.0.51] X-Barracuda-Start-Time: 1600847510 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://incspam.chinasofti.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at chinasoftinc.com X-Barracuda-Scan-Msg-Size: 1633 Subject: [dpdk-dev] [PATCH v2] app/testpmd: update Rx RSS HASH offload when setting MQ RSS 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Huisong Li Currently, when starting testpmd application without '--disable-rss' and the number of Rx queue configured is greater than 1, ETH_MQ_RX_RSS flag is set in port->dev_conf.rxmode.mq_mode in testpmd application, and DEV_RX_OFFLOAD_RSS_HASH flag is set in rx_offloads (dev->data->dev_conf.rxmode.offloads) according to the ETH_MQ_RX_RSS flag of rxmode.mq_mode in PMD drivers. However, DEV_RX_OFFLOAD_RSS_HASH is not set to rx_offloads maintained in testpmd application, this will cause the inconsistent problem that rx_offloads is different for testpmd and PMD drivers. Signed-off-by: Huisong Li Signed-off-by: Wei Hu (Xavier) --- v1 -> v2: add check if PMD support DEV_RX_OFFLOAD_RSS_HASH before setting it. --- app/test-pmd/testpmd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index fe6450c..a36db76 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3353,11 +3353,15 @@ init_port_config(void) } if (port->dcb_flag == 0) { - if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) + if (port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) { port->dev_conf.rxmode.mq_mode = (enum rte_eth_rx_mq_mode) (rx_mq_mode & ETH_MQ_RX_RSS); - else + if (port->dev_info.rx_offload_capa & + DEV_RX_OFFLOAD_RSS_HASH) + port->dev_conf.rxmode.offloads |= + DEV_RX_OFFLOAD_RSS_HASH; + } else port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; } -- 2.9.5