[ovs-dev] [PATCH v10 06/14] dp-packet: Handle multi-seg mbufs in helper funcs.

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


On Fri, Sep 28, 2018 at 05:15:07PM +0100, Tiago Lam wrote:
> Most helper functions in dp-packet assume that the data held by a
> dp_packet is contiguous, and perform operations such as pointer
> arithmetic under that assumption. However, with the introduction of
> multi-segment mbufs, where data is non-contiguous, such assumptions are
> no longer possible. Some examples of Such helper functions are
> dp_packet_tail(), dp_packet_tailroom(), dp_packet_end(),
> dp_packet_get_allocated() and dp_packet_at().
> 
> Thus, instead of assuming contiguous data in dp_packet, they  now
> iterate over the (non-contiguous) data in mbufs to perform their
> calculations.
> 
> Finally, dp_packet_use__() has also been modified to perform the
> initialisation of the packet (and setting the source) before continuing
> to set its size and data length, which now depends on the type of
> packet.
> 
> Co-authored-by: Mark Kavanagh <mark.b.kavanagh at intel.com>
> 
> Signed-off-by: Mark Kavanagh <mark.b.kavanagh at intel.com>
> 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