int
ofproto_run(struct ofproto *p)
{
+ /* handle protocol messages coming from the datapath */
int error = ofproto_run1(p);
if (!error) {
error = ofproto_run2(p, false);
}
}
+/*
+ * Calls the netdevice dpif_netdev_recv() callback,
+ * that read a protocol packet from the dpif queue
+ * and handle the message
+ */
int
ofproto_run1(struct ofproto *p)
{
/* XXX Should we translate the dpif_execute() errno value into an OpenFlow
* error code? */
+ fprintf(stderr, "OFPROTO EXECUTE\n");
dpif_execute(p->dpif, flow->in_port, odp_actions.actions,
odp_actions.n_actions, packet);
return 0;
*
* See the top-level comment in fail-open.c for more information.
*/
- send_packet_in(p, ofpbuf_clone(packet));
+ send_packet_in(p, ofpbuf_clone_with_headroom(packet,
+ DPIF_RECV_MSG_PADDING));
}
ofpbuf_pull(packet, sizeof *msg);