summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuawei Xie <huawei.xie@intel.com>2014-12-10 02:49:44 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-12-11 01:42:03 +0100
commit8bd6c395a568ef7a70c64fbef0968c456bed6d29 (patch)
tree3815d549e18874e21857ed6bbff66d6283ded16f
parent0b04f881a8092c5cd9e60179c6136fc383f8b082 (diff)
downloaddpdk-8bd6c395a568ef7a70c64fbef0968c456bed6d29.zip
dpdk-8bd6c395a568ef7a70c64fbef0968c456bed6d29.tar.gz
dpdk-8bd6c395a568ef7a70c64fbef0968c456bed6d29.tar.xz
examples/vhost: increase maximum queue number
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 <huawei.xie@intel.com>
-rw-r--r--examples/vhost/main.c8
1 files changed, 7 insertions, 1 deletions
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;