From patchwork Tue Sep 8 02:16:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wei Hu (Xavier)" X-Patchwork-Id: 76816 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15E12A04AA; Tue, 8 Sep 2020 04:16:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFFC61C12A; Tue, 8 Sep 2020 04:16:36 +0200 (CEST) Received: from mail.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id AFD4A1C11B for ; Tue, 8 Sep 2020 04:16:33 +0200 (CEST) Received: from localhost.localdomain (65.49.108.226) by INCCAS002.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 8 Sep 2020 10:16:29 +0800 From: "Wei Hu (Xavier)" To: , Wenzhuo Lu , Beilei Xing , Bernard Iremonger CC: , , Date: Tue, 8 Sep 2020 10:16:02 +0800 Message-ID: <20200908021603.44862-2-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 X-Originating-IP: [65.49.108.226] Subject: [dpdk-dev] [PATCH 1/2] 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) --- app/test-pmd/testpmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 7842c3b..73543bb 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3356,11 +3356,13 @@ 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 + port->dev_conf.rxmode.offloads |= + DEV_RX_OFFLOAD_RSS_HASH; + } else port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; } From patchwork Tue Sep 8 02:16:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wei Hu (Xavier)" X-Patchwork-Id: 76817 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6217AA04AA; Tue, 8 Sep 2020 04:16:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 014B01C133; Tue, 8 Sep 2020 04:16:39 +0200 (CEST) Received: from mail.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id 2A06D1C12F for ; Tue, 8 Sep 2020 04:16:37 +0200 (CEST) Received: from localhost.localdomain (65.49.108.226) by INCCAS002.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 8 Sep 2020 10:16:34 +0800 From: "Wei Hu (Xavier)" To: , Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Jijiang Liu , Jingjing Wu , Helin Zhang CC: , , Date: Tue, 8 Sep 2020 10:16:03 +0800 Message-ID: <20200908021603.44862-3-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 X-Originating-IP: [65.49.108.226] Subject: [dpdk-dev] [PATCH 2/2] app/testpmd: retain original FDIR mode when configuring DCB 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 Sometimes, we have to start testpmd application with --pkt-filter-mode to test flow table feature. When using 'port config 0 dcb vt off 4 pfc on' command, the dcb information are configured in init_port_dcb_config function by get_eth_dcb_conf function, And then rte_eth_dev_configure API function will be called to re-configure PMD driver. The values of rxmode and txmode in rte_eth_conf struct used to configure PMD driver, come from the current values maintained in testpmd. However, the fdir_conf.mode in rte_eth_conf struct is not set, which may cause that some PMD driver cannot test the flow table feature when multiple TCs are enabled. Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Wei Hu (Xavier) --- app/test-pmd/testpmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 73543bb..19bf972 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3521,6 +3521,7 @@ init_port_dcb_config(portid_t pid, port_conf.rxmode = rte_port->dev_conf.rxmode; port_conf.txmode = rte_port->dev_conf.txmode; + port_conf.fdir_conf.mode = rte_port->dev_conf.fdir_conf.mode; /*set configuration of DCB in vt mode and DCB in non-vt mode*/ retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);