[ovs-dev] [PATCH v10 03/14] dp-packet: Fix allocated size on DPDK init.

Flavio Leitner fbl at sysclose.org
Wed Oct 3 18:25:56 UTC 2018

On Fri, Sep 28, 2018 at 05:15:04PM +0100, Tiago Lam wrote:
> When enabled with DPDK OvS deals with two types of packets, the ones
> coming from the mempool and the ones locally created by OvS - which are
> copied to mempool mbufs before output. In the latter, the space is
> allocated from the system, while in the former the mbufs are allocated
> from a mempool, which takes care of initialising them appropriately.
> In the current implementation, during mempool's initialisation of mbufs,
> dp_packet_set_allocated() is called from dp_packet_init_dpdk() without
> considering that the allocated space, in the case of multi-segment
> mbufs, might be greater than a single mbuf.  Furthermore, given that
> dp_packet_init_dpdk() is on the code path that's called upon mempool's
> initialisation, a call to dp_packet_set_allocated() is redundant, since
> mempool takes care of initialising it.
> To fix this, dp_packet_set_allocated() is no longer called after
> initialisation of a mempool, only in dp_packet_init__(), which is still
> called by OvS when initialising locally created packets.
> Signed-off-by: Tiago Lam <tiago.lam at intel.com>
> Acked-by: Eelco Chaudron <echaudro at redhat.com>
> ---

Acked-by: Flavio Leitner <fbl at sysclose.org>

More information about the dev mailing list