error = rconn_send(sw->rconn, msg, NULL);
}
}
+ if (protocol & usable_protocols) {
+ for (i = 0; !error && i < sw->n_default_flows; i++) {
+ msg = ofputil_encode_flow_mod(&sw->default_flows[i], protocol);
+ error = rconn_send(sw->rconn, msg, NULL);
+ }
- for (i = 0; !error && i < sw->n_default_flows; i++) {
- msg = ofputil_encode_flow_mod(&sw->default_flows[i], protocol);
- error = rconn_send(sw->rconn, msg, NULL);
- }
-
- if (error) {
- VLOG_INFO_RL(&rl, "%s: failed to queue default flows (%s)",
- rconn_get_name(sw->rconn), strerror(error));
+ if (error) {
+ VLOG_INFO_RL(&rl, "%s: failed to queue default flows (%s)",
+ rconn_get_name(sw->rconn), strerror(error));
+ }
+ } else {
+ VLOG_INFO_RL(&rl, "%s: failed to set usable protocol",
+ rconn_get_name(sw->rconn));
}
}
sw->protocol = protocol;
case OFPTYPE_PORT_MOD:
case OFPTYPE_BARRIER_REQUEST:
case OFPTYPE_BARRIER_REPLY:
+ case OFPTYPE_QUEUE_GET_CONFIG_REQUEST:
+ case OFPTYPE_QUEUE_GET_CONFIG_REPLY:
case OFPTYPE_DESC_STATS_REQUEST:
case OFPTYPE_DESC_STATS_REPLY:
case OFPTYPE_FLOW_STATS_REQUEST:
case OFPTYPE_FLOW_MOD_TABLE_ID:
case OFPTYPE_SET_PACKET_IN_FORMAT:
case OFPTYPE_FLOW_AGE:
- case OFPTYPE_SET_ASYNC_CONFIG:
case OFPTYPE_SET_CONTROLLER_ID:
case OFPTYPE_FLOW_MONITOR_STATS_REQUEST:
case OFPTYPE_FLOW_MONITOR_STATS_REPLY:
case OFPTYPE_FLOW_MONITOR_CANCEL:
case OFPTYPE_FLOW_MONITOR_PAUSED:
case OFPTYPE_FLOW_MONITOR_RESUMED:
+ case OFPTYPE_GET_ASYNC_REQUEST:
+ case OFPTYPE_GET_ASYNC_REPLY:
+ case OFPTYPE_SET_ASYNC_CONFIG:
+ case OFPTYPE_METER_MOD:
+ case OFPTYPE_GROUP_REQUEST:
+ case OFPTYPE_GROUP_REPLY:
+ case OFPTYPE_GROUP_DESC_REQUEST:
+ case OFPTYPE_GROUP_DESC_REPLY:
+ case OFPTYPE_GROUP_FEATURES_REQUEST:
+ case OFPTYPE_GROUP_FEATURES_REPLY:
+ case OFPTYPE_METER_REQUEST:
+ case OFPTYPE_METER_REPLY:
+ case OFPTYPE_METER_CONFIG_REQUEST:
+ case OFPTYPE_METER_CONFIG_REPLY:
+ case OFPTYPE_METER_FEATURES_REQUEST:
+ case OFPTYPE_METER_FEATURES_REPLY:
+ case OFPTYPE_TABLE_FEATURES_REQUEST:
+ case OFPTYPE_TABLE_FEATURES_REPLY:
default:
if (VLOG_IS_DBG_ENABLED()) {
char *s = ofp_to_string(msg->data, msg->size, 2);
struct ofp_switch_config *osc;
int ofp_version = rconn_get_version(sw->rconn);
- assert(ofp_version > 0 && ofp_version < 0xff);
+ ovs_assert(ofp_version > 0 && ofp_version < 0xff);
/* Send OFPT_FEATURES_REQUEST. */
b = ofpraw_alloc(OFPRAW_OFPT_FEATURES_REQUEST, ofp_version, 0);
/* Extract flow data from 'opi' into 'flow'. */
ofpbuf_use_const(&pkt, pi.packet, pi.packet_len);
- flow_extract(&pkt, 0, pi.fmd.tun_id, pi.fmd.in_port, &flow);
+ flow_extract(&pkt, 0, 0, NULL, pi.fmd.in_port, &flow);
+ flow.tunnel.tun_id = pi.fmd.tun_id;
/* Choose output port. */
out_port = lswitch_choose_destination(sw, &flow);
/* The output port is known, or we always flood everything, so add a
* new flow. */
memset(&fm, 0, sizeof fm);
- cls_rule_init(&flow, &sw->wc, 0, &fm.cr);
- ofputil_normalize_rule_quiet(&fm.cr);
+ match_init(&fm.match, &flow, &sw->wc);
+ ofputil_normalize_match_quiet(&fm.match);
+ fm.priority = 0;
fm.table_id = 0xff;
fm.command = OFPFC_ADD;
fm.idle_timeout = sw->max_idle;