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 5F8E6A0548; Thu, 4 Nov 2021 10:41:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D38C410D5; Thu, 4 Nov 2021 10:41:38 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id D83B640DFD for ; Thu, 4 Nov 2021 10:41:35 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="218577454" X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="218577454" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 02:41:35 -0700 X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="501458903" Received: from dpdk.cd.intel.com ([10.240.178.133]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 02:41:32 -0700 From: Jie Wang To: dev@dpdk.org Cc: yuying.zhang@intel.com, xiaoyun.li@intel.com, stevex.yang@intel.com, junfeng.guo@intel.com, qi.z.zhang@intel.com, Jie Wang Date: Thu, 4 Nov 2021 17:29:47 +0800 Message-Id: <20211104092947.244962-1-jie1x.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211103030705.211093-1-jie1x.wang@intel.com> References: <20211103030705.211093-1-jie1x.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix set Rx offloads RSS hash off 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" When we set Rx offloads RSS hash off in cmdline, then we start port, if dev->data->dev_conf.rxmode.mq_mode RSS enable(multiple queues mode), it will load RSS hash in driver and sync to port. After setting Rx offloads RSS hash off, this patch removes RTE_ETH_MQ_RX_RSS in port->dev_conf.rxmode.mq_mode to fix this issue. And after setting Rx offloads RSS hash on, this patch also adds RTE_ETH_MQ_RX_RSS in port->dev_conf.rxmode.mq_mode. Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API") Signed-off-by: Jie Wang --- app/test-pmd/cmdline.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index d08a1c9777..f8277e4443 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -16176,10 +16176,16 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result, port->dev_conf.rxmode.offloads |= single_offload; for (q = 0; q < nb_rx_queues; q++) port->rx_conf[q].offloads |= single_offload; + + if (single_offload & 0x80000) + port->dev_conf.rxmode.mq_mode |= RTE_ETH_MQ_RX_RSS; } else { port->dev_conf.rxmode.offloads &= ~single_offload; for (q = 0; q < nb_rx_queues; q++) port->rx_conf[q].offloads &= ~single_offload; + + if (single_offload & 0x80000) + port->dev_conf.rxmode.mq_mode &= ~RTE_ETH_MQ_RX_RSS; } cmd_reconfig_device_queue(port_id, 1, 1); -- 2.25.1