examples/vhost: fix mbuf allocation
[dpdk.git] / examples / vhost / main.c
index e08f451..a97300b 100644 (file)
@@ -70,7 +70,7 @@
 #define NUM_MBUFS_PER_PORT ((MAX_QUEUES*RTE_TEST_RX_DESC_DEFAULT) +            \
                                                        (num_switching_cores*MAX_PKT_BURST) +                   \
                                                        (num_switching_cores*RTE_TEST_TX_DESC_DEFAULT) +\
-                                                       (num_switching_cores*MBUF_CACHE_SIZE))
+                                                       ((num_switching_cores+1)*MBUF_CACHE_SIZE))
 
 #define MBUF_CACHE_SIZE        128
 #define MBUF_DATA_SIZE RTE_MBUF_DEFAULT_BUF_SIZE