On 10 Jul 2018, at 13:06, Tiago Lam wrote:
> When configuring a mempool, in netdev_dpdk_mempool_configure(), the
> result of a call to dpdk_buf_size() is being used as the MTU. This,
> however, is not the MTU but a ROUND_UP aligned number based on the MTU,
> which could lead to the reuse of mempools even when the real MTUs
> between different ports differ but somehow round up to the same mbuf
> size.
>
> To support multi-segment mbufs, which is coming in later commits, this
> distinction is important. For multi-segment mbufs the mbuf size is
> always the same (multiple mbufs are chained together to hold the
> packet's data), which means that using the mbuf size as the mtu would
> lead to reusing always the same mempool, independent of the MTU set.
>
> To fix this, two fields are now passed to dpdk_mp_create(), the mtu and
> the mbuf_size, thus creating a distinction between the two. The latter
> is used for telling rte_pktmbuf_pool_create() the size of each mbuf,
> while the former is used for tracking purposes in struct dpdk_mp and as
> an input to create a unique hash for the mempool's name.
>
> Signed-off-by: Tiago Lam <[email protected]>
> ---
Changes look good to me.
Acked-by: Eelco Chaudron <[email protected]>
<SNIP>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev