From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 92AA9255 for ; Mon, 12 Jan 2015 06:59:34 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 11 Jan 2015 21:59:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,742,1413270000"; d="scan'208";a="635864149" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 11 Jan 2015 21:59:32 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t0C5xUFc023500; Mon, 12 Jan 2015 13:59:30 +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 t0C5xRAV022476; Mon, 12 Jan 2015 13:59:29 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0C5xRu6022472; Mon, 12 Jan 2015 13:59:27 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Mon, 12 Jan 2015 13:59:12 +0800 Message-Id: <1421042352-22399-7-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1421042352-22399-1-git-send-email-changchun.ouyang@intel.com> References: <1420612355-6666-1-git-send-email-changchun.ouyang@intel.com> <1421042352-22399-1-git-send-email-changchun.ouyang@intel.com> Subject: [dpdk-dev] [PATCH v6 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: Mon, 12 Jan 2015 05:59:50 -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 v6 - Put common statement outside the if branch. changes in v5 - Assign txmode.mq_mode with ETH_MQ_TX_NONE explicitly; - Remove one line wrong comment. --- app/test-pmd/testpmd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 8c69756..773b8af 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,17 @@ 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; + 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