[ovs-dev] [PATCH v2 2/2] dpif-netdev: batch packet processing

Jarno Rajahalme jrajahalme at nicira.com
Thu Jun 5 19:31:50 UTC 2014


On Jun 5, 2014, at 10:24 AM, Daniele Di Proietto <ddiproietto at vmware.com> wrote:

> diff --git a/lib/ofpbuf.h b/lib/ofpbuf.h
> index 13a3e9d..9f4b30f 100644
> --- a/lib/ofpbuf.h
> +++ b/lib/ofpbuf.h
> @@ -76,6 +76,8 @@ struct ofpbuf {
>                                    or UINT16_MAX. */
>     enum ofpbuf_source source;  /* Source of memory allocated as 'base'. */
>     struct list list_node;      /* Private list element for use by owner. */
> +
> +    struct pkt_metadata md;     /* Packet metadata */
> };

We do quite a lot of copying of ofpbufs when parsing OpenFlow messages, for example, so including the pkt_metadata in the struct ofpbuf is a bit problematic. How about defining something like:

struct dpif_packet {
    struct ofpbuf packet;
    struct pkt_metadata md;
};

and then using this instead the plain ofpbuf in the dpif-netdev and the like. This would require more changes in the DPDK code that now deals with the ofpbuf to have the space for the md as well, but the test of the system would not need to copy the dummy metadata around.

  Jarno

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140605/0071d153/attachment-0005.html>


More information about the dev mailing list