From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id F1679DE0 for ; Tue, 9 Dec 2014 19:49:51 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 09 Dec 2014 10:47:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,546,1413270000"; d="scan'208";a="651108454" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 09 Dec 2014 10:49:50 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id sB9Inm6Z002974; Wed, 10 Dec 2014 02:49:48 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id sB9Injc2012948; Wed, 10 Dec 2014 02:49:48 +0800 Received: (from hxie5@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id sB9InjNF012942; Wed, 10 Dec 2014 02:49:45 +0800 From: Huawei Xie To: dev@dpdk.org Date: Wed, 10 Dec 2014 02:49:44 +0800 Message-Id: <1418150984-12908-1-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] examples/vhost: increase MAX_QUEUE number 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: Tue, 09 Dec 2014 18:49:52 -0000 increase MAX_QUEUES from 256 to 512 In vhost example, MAX_QUEUES macro should be the maximum possible queue number of the port. Theoretically we should only set up the queues that are used, i.e., first rx queue of each pool, or at most queues from 0 to MAX_QUEUES. Before we revise the implementation and are certain all NICs support this well, add a remind message to user. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 0c76ece..d2c1852 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -53,7 +53,7 @@ #include "main.h" -#define MAX_QUEUES 256 +#define MAX_QUEUES 512 /* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1 @@ -380,6 +380,12 @@ port_init(uint8_t port) /* The max pool number from dev_info will be used to validate the pool number specified in cmd line */ rte_eth_dev_info_get (port, &dev_info); + if (dev_info.max_rx_queues > MAX_QUEUES) { + rte_exit(EXIT_FAILURE, + "please define MAX_QUEUES no less than %u in %s\n", + dev_info.max_rx_queues, __FILE__); + } + rxconf = &dev_info.default_rxconf; txconf = &dev_info.default_txconf; rxconf->rx_drop_en = 1; -- 1.8.1.4