examples/vhost: fix calculation of mbuf count
When calculating 'nr_mbufs_per_core', 'MAX_PKT_BURST' was mutiplied twice. Fix it by removing one of them. Fixes: bdb19b771e6f ("examples/vhost: fix mbuf allocation failure") Cc: stable@dpdk.org Signed-off-by: Yong Wang <wang.yong19@zte.com.cn> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
This commit is contained in:
parent
1ce3c7fe14
commit
12ee45a362
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user