[ovs-dev] [PATCH] ofproto: Avoid user->kernel->user round-trip for many controller actions.
casado at nicira.com
Thu Aug 5 17:47:59 UTC 2010
> On Wed, Aug 4, 2010 at 2:09 PM, Ben Pfaff <blp at nicira.com
> <mailto:blp at nicira.com>> wrote:
> + copy = ofpbuf_new(DPIF_RECV_MSG_PADDING + sizeof(struct
> + + 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).
For some applications this is used fairly heavily. If the optimization
is not too onerous, probably worthwhile adding.
More information about the dev