}
/* Sets the MAC aging timeout for the OFPP_NORMAL action on 'ofproto' to
- * 'idle_time', in seconds. */
+ * 'idle_time', in seconds, and the maximum number of MAC table entries to
+ * 'max_entries'. */
void
-ofproto_set_mac_idle_time(struct ofproto *ofproto, unsigned idle_time)
+ofproto_set_mac_table_config(struct ofproto *ofproto, unsigned idle_time,
+ size_t max_entries)
{
- if (ofproto->ofproto_class->set_mac_idle_time) {
- ofproto->ofproto_class->set_mac_idle_time(ofproto, idle_time);
- }
-}
-
-void
-ofproto_set_desc(struct ofproto *p,
- const char *mfr_desc, const char *hw_desc,
- const char *sw_desc, const char *serial_desc,
- const char *dp_desc)
-{
- struct ofp_desc_stats *ods;
-
- if (mfr_desc) {
- if (strlen(mfr_desc) >= sizeof ods->mfr_desc) {
- VLOG_WARN("%s: truncating mfr_desc, must be less than %zu bytes",
- p->name, sizeof ods->mfr_desc);
- }
- free(p->mfr_desc);
- p->mfr_desc = xstrdup(mfr_desc);
- }
- if (hw_desc) {
- if (strlen(hw_desc) >= sizeof ods->hw_desc) {
- VLOG_WARN("%s: truncating hw_desc, must be less than %zu bytes",
- p->name, sizeof ods->hw_desc);
- }
- free(p->hw_desc);
- p->hw_desc = xstrdup(hw_desc);
- }
- if (sw_desc) {
- if (strlen(sw_desc) >= sizeof ods->sw_desc) {
- VLOG_WARN("%s: truncating sw_desc, must be less than %zu bytes",
- p->name, sizeof ods->sw_desc);
- }
- free(p->sw_desc);
- p->sw_desc = xstrdup(sw_desc);
- }
- if (serial_desc) {
- if (strlen(serial_desc) >= sizeof ods->serial_num) {
- VLOG_WARN("%s: truncating serial_desc, must be less than %zu "
- "bytes", p->name, sizeof ods->serial_num);
- }
- free(p->serial_desc);
- p->serial_desc = xstrdup(serial_desc);
- }
- if (dp_desc) {
- if (strlen(dp_desc) >= sizeof ods->dp_desc) {
- VLOG_WARN("%s: truncating dp_desc, must be less than %zu bytes",
- p->name, sizeof ods->dp_desc);
- }
- free(p->dp_desc);
- p->dp_desc = xstrdup(dp_desc);
+ if (ofproto->ofproto_class->set_mac_table_config) {
+ ofproto->ofproto_class->set_mac_table_config(ofproto, idle_time,
+ max_entries);
}
}
}
SHASH_FOR_EACH_SAFE(node, next, &init_ofp_ports) {
- const struct iface_hint *iface_hint = node->data;
+ struct iface_hint *iface_hint = node->data;
if (!strcmp(iface_hint->br_name, p->name)) {
free(iface_hint->br_name);
free(iface_hint->br_type);
+ free(iface_hint);
shash_delete(&init_ofp_ports, node);
}
}
if (error) {
goto exit_free_ofpacts;
}
-
+
/* Record the operation for logging a summary report. */
switch (fm.command) {
case OFPFC_ADD:
return handle_flow_monitor_request(ofconn, oh);
/* FIXME: Change the following once they are implemented: */
+ case OFPTYPE_QUEUE_GET_CONFIG_REQUEST:
case OFPTYPE_GET_ASYNC_REQUEST:
case OFPTYPE_METER_MOD:
case OFPTYPE_GROUP_REQUEST:
case OFPTYPE_FLOW_REMOVED:
case OFPTYPE_PORT_STATUS:
case OFPTYPE_BARRIER_REPLY:
+ case OFPTYPE_QUEUE_GET_CONFIG_REPLY:
case OFPTYPE_DESC_STATS_REPLY:
case OFPTYPE_FLOW_STATS_REPLY:
case OFPTYPE_QUEUE_STATS_REPLY: