On Wed, Aug 4, 2010 at 2:09 PM, Ben Pfaff <span dir="ltr"><<a href="mailto:blp@nicira.com">blp@nicira.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
+ copy = ofpbuf_new(DPIF_RECV_MSG_PADDING + sizeof(struct odp_msg)<br>
+ + packet->size);<br>
+ ofpbuf_reserve(copy, DPIF_RECV_MSG_PADDING);<br>
+ msg = ofpbuf_put_uninit(copy, sizeof *msg);<br>
+ msg->type = _ODPL_ACTION_NR;<br>
+ msg->length = sizeof(struct odp_msg) + packet->size;<br>
+ msg->port = in_port;<br>
+ msg->reserved = 0;<br>
+ msg->arg = actions[0].controller.arg;<br>
+ ofpbuf_put(copy, packet->data, packet->size);<br></blockquote><div><br>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).<br>
</div></div>