* Re: [dpdk-dev] [PATCH] examples/vhost: fix calc err of nr_mbufs_per_core
2017-01-12 3:52 [dpdk-dev] [PATCH] examples/vhost: fix calc err of nr_mbufs_per_core Yong Wang
@ 2017-01-12 2:58 ` Yuanhan Liu
0 siblings, 0 replies; 2+ messages in thread
From: Yuanhan Liu @ 2017-01-12 2:58 UTC (permalink / raw)
To: Yong Wang; +Cc: dev
On Wed, Jan 11, 2017 at 10:52:17PM -0500, Yong Wang wrote:
> 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")
>
> Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Applied to dpdk-next-virtio.
Thanks.
--yliu
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH] examples/vhost: fix calc err of nr_mbufs_per_core
@ 2017-01-12 3:52 Yong Wang
2017-01-12 2:58 ` Yuanhan Liu
0 siblings, 1 reply; 2+ messages in thread
From: Yong Wang @ 2017-01-12 3:52 UTC (permalink / raw)
To: yuanhan.liu; +Cc: dev, Yong Wang
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")
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
examples/vhost/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index ac1f6e2..81a6a8c 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1393,7 +1393,7 @@ static inline void __attribute__((always_inline))
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);
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-12 2:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 3:52 [dpdk-dev] [PATCH] examples/vhost: fix calc err of nr_mbufs_per_core Yong Wang
2017-01-12 2:58 ` Yuanhan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).