VLOG_DEFINE_THIS_MODULE(ofproto);
+COVERAGE_DEFINE(odp_overflow);
+COVERAGE_DEFINE(ofproto_add_wc_flow);
+COVERAGE_DEFINE(ofproto_agg_request);
+COVERAGE_DEFINE(ofproto_costly_flags);
+COVERAGE_DEFINE(ofproto_ctlr_action);
+COVERAGE_DEFINE(ofproto_del_wc_flow);
+COVERAGE_DEFINE(ofproto_dp_missed);
+COVERAGE_DEFINE(ofproto_error);
+COVERAGE_DEFINE(ofproto_expiration);
+COVERAGE_DEFINE(ofproto_expired);
+COVERAGE_DEFINE(ofproto_flows_req);
+COVERAGE_DEFINE(ofproto_flush);
+COVERAGE_DEFINE(ofproto_invalidated);
+COVERAGE_DEFINE(ofproto_mod_wc_flow);
+COVERAGE_DEFINE(ofproto_no_packet_in);
+COVERAGE_DEFINE(ofproto_odp_unchanged);
+COVERAGE_DEFINE(ofproto_ofconn_stuck);
+COVERAGE_DEFINE(ofproto_ofp2odp);
+COVERAGE_DEFINE(ofproto_packet_in);
+COVERAGE_DEFINE(ofproto_packet_out);
+COVERAGE_DEFINE(ofproto_queue_req);
+COVERAGE_DEFINE(ofproto_recv_openflow);
+COVERAGE_DEFINE(ofproto_reinit_ports);
+COVERAGE_DEFINE(ofproto_revalidate);
+COVERAGE_DEFINE(ofproto_revalidate_moved);
+COVERAGE_DEFINE(ofproto_revalidate_rule);
+COVERAGE_DEFINE(ofproto_subrule_create);
+COVERAGE_DEFINE(ofproto_unexpected_rule);
+COVERAGE_DEFINE(ofproto_uninstallable);
+COVERAGE_DEFINE(ofproto_update_port);
+
#include "sflow_api.h"
struct ofport {
struct ofp_port_status *ops;
struct ofpbuf *b;
- if (!ofconn_receives_async_msgs(ofconn)) {
+ /* Primary controllers, even slaves, should always get port status
+ updates. Otherwise obey ofconn_receives_async_msgs(). */
+ if (ofconn->type != OFCONN_PRIMARY
+ && !ofconn_receives_async_msgs(ofconn)) {
continue;
}
return;
} else if (old_ofport && new_ofport) {
/* Most of the 'config' bits are OpenFlow soft state, but
- * OFPPC_PORT_DOWN is maintained the kernel. So transfer the OpenFlow
- * bits from old_ofport. (make_ofport() only sets OFPPC_PORT_DOWN and
- * leaves the other bits 0.) */
+ * OFPPC_PORT_DOWN is maintained by the kernel. So transfer the
+ * OpenFlow bits from old_ofport. (make_ofport() only sets
+ * OFPPC_PORT_DOWN and leaves the other bits 0.) */
new_ofport->opp.config |= old_ofport->opp.config & ~OFPPC_PORT_DOWN;
if (ofport_equal(old_ofport, new_ofport)) {
payload.size = msg->length - sizeof *msg;
flow_extract(&payload, msg->arg, msg->port, &flow);
+ packet->l2 = payload.l2;
+ packet->l3 = payload.l3;
+ packet->l4 = payload.l4;
+ packet->l7 = payload.l7;
+
/* Check with in-band control to see if this packet should be sent
* to the local port regardless of the flow table. */
if (in_band_msg_in_hook(p->in_band, &flow, &payload)) {