From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6B6675A7A for ; Wed, 7 Jan 2015 07:33:01 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 06 Jan 2015 22:28:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="437385029" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 06 Jan 2015 22:20:33 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t076Wsah001207; Wed, 7 Jan 2015 14:32:54 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t076Wpkx006741; Wed, 7 Jan 2015 14:32:53 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t076Wpdf006737; Wed, 7 Jan 2015 14:32:51 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Wed, 7 Jan 2015 14:32:35 +0800 Message-Id: <1420612355-6666-7-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1420612355-6666-1-git-send-email-changchun.ouyang@intel.com> References: <1420355937-18484-1-git-send-email-changchun.ouyang@intel.com> <1420612355-6666-1-git-send-email-changchun.ouyang@intel.com> Subject: [dpdk-dev] [PATCH v5 6/6] testpmd: Set Rx VMDq RSS mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2015 06:33:03 -0000 Set VMDq RSS mode if it has VF(VF number is more than 1) and has RSS information. Signed-off-by: Changchun Ouyang changes in v5 - Assign txmode.mq_mode with ETH_MQ_TX_NONE explicitly; - Remove one line wrong comment. --- app/test-pmd/testpmd.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 8c69756..64fd4ee 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1700,7 +1700,6 @@ init_port_config(void) port->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0; } - /* In SR-IOV mode, RSS mode is not available */ if (port->dcb_flag == 0 && port->dev_info.max_vfs == 0) { if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; @@ -1708,6 +1707,20 @@ init_port_config(void) port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; } + if (port->dev_info.max_vfs != 0) { + if (port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) { + port->dev_conf.rxmode.mq_mode = + ETH_MQ_RX_VMDQ_RSS; + port->dev_conf.txmode.mq_mode = + ETH_MQ_TX_NONE; + } else { + port->dev_conf.rxmode.mq_mode = + ETH_MQ_RX_NONE; + port->dev_conf.txmode.mq_mode = + ETH_MQ_TX_NONE; + } + } + port->rx_conf.rx_thresh = rx_thresh; port->rx_conf.rx_free_thresh = rx_free_thresh; port->rx_conf.rx_drop_en = rx_drop_en; -- 1.8.4.2