int mtu;
};
+void ofproto_port_set_state(struct ofport *, ovs_be32 state);
+
/* An OpenFlow flow within a "struct ofproto".
*
* With few exceptions, ofproto implementations may look at these fields but
connmgr_send_port_status(port->ofproto->connmgr, &port->opp, OFPPR_MODIFY);
}
+/* Update OpenFlow 'state' in 'port' and notify controller. */
+void
+ofproto_port_set_state(struct ofport *port, ovs_be32 state)
+{
+ if (port->opp.state != state) {
+ port->opp.state = state;
+ connmgr_send_port_status(port->ofproto->connmgr, &port->opp,
+ OFPPR_MODIFY);
+ }
+}
+
void
ofproto_port_unregister(struct ofproto *ofproto, uint16_t ofp_port)
{