aboutsummaryrefslogtreecommitdiffstats
path: root/examples/vhost/main.c
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-03-02 16:15:51 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-03-03 14:41:36 +0100
commitce3d555e43e3795b5d9507fcfc76b7a0a92fd0d6 (patch)
tree3a9e9f8f6a62c7146fb391eae34481b2af4f7ff2 /examples/vhost/main.c
parent6b3e017e5d25f15da73f7700f7f2ac553ef1a2e9 (diff)
Imported Upstream version 16.11.1
Change-Id: I1e965265578efaaf08e5628607f53d2386d2df9f Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'examples/vhost/main.c')
-rw-r--r--examples/vhost/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 07098594..eddaf926 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1393,7 +1393,7 @@ create_mbuf_pool(uint16_t nr_port, uint32_t nr_switch_core, uint32_t mbuf_size,
mtu = 64 * 1024;
nr_mbufs_per_core = (mtu + mbuf_size) * MAX_PKT_BURST /
- (mbuf_size - RTE_PKTMBUF_HEADROOM) * MAX_PKT_BURST;
+ (mbuf_size - RTE_PKTMBUF_HEADROOM);
nr_mbufs_per_core += nr_rx_desc;
nr_mbufs_per_core = RTE_MAX(nr_mbufs_per_core, nr_mbuf_cache);
@@ -1436,11 +1436,12 @@ main(int argc, char *argv[])
if (ret < 0)
rte_exit(EXIT_FAILURE, "Invalid argument\n");
- for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)
+ for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
TAILQ_INIT(&lcore_info[lcore_id].vdev_list);
if (rte_lcore_is_enabled(lcore_id))
- lcore_ids[core_id ++] = lcore_id;
+ lcore_ids[core_id++] = lcore_id;
+ }
if (rte_lcore_count() > RTE_MAX_LCORE)
rte_exit(EXIT_FAILURE,"Not enough cores\n");