[ovs-dev] [PATCH] ofproto: Avoid user->kernel->user round-trip for many controller actions.
jesse at nicira.com
Thu Aug 5 17:41:24 UTC 2010
On Wed, Aug 4, 2010 at 2:09 PM, Ben Pfaff <blp at nicira.com> wrote:
> + copy = ofpbuf_new(DPIF_RECV_MSG_PADDING + sizeof(struct odp_msg)
> + + packet->size);
> + ofpbuf_reserve(copy, DPIF_RECV_MSG_PADDING);
> + msg = ofpbuf_put_uninit(copy, sizeof *msg);
> + msg->type = _ODPL_ACTION_NR;
> + msg->length = sizeof(struct odp_msg) + packet->size;
> + msg->port = in_port;
> + msg->reserved = 0;
> + msg->arg = actions.controller.arg;
> + ofpbuf_put(copy, packet->data, packet->size);
How common is it that sending to the controller is the only action? It
seems like that might be a fairly common scenario here. If so, it would be
ideal if we could avoid copying the packet an additional time here. I don't
know if it is worth it though seeing as this is already a fairly narrow use
case (first packet to the controller).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev