enum nx_flow_format {
NXFF_OPENFLOW10 = 0, /* Standard OpenFlow 1.0 compatible. */
- NXFF_NXM = 2 /* Nicira extended match. */
+ NXFF_NXM = 2, /* Nicira extended match. */
+ NXFF_OPENFLOW12 = 3 /* OpenFlow 1.2 format. */
};
/* NXT_SET_FLOW_FORMAT request. */
{
switch (version) {
case OFP10_VERSION: return OFPUTIL_P_OF10;
+ case OFP12_VERSION: return OFPUTIL_P_OF12;
default: return 0;
}
}
-/* Returns the OpenFlow protocol version number (e.g. OFP10_VERSION or
- * OFP11_VERSION) that corresponds to 'protocol'. */
+/* Returns the OpenFlow protocol version number (e.g. OFP10_VERSION,
+ * OFP11_VERSION or OFP12_VERSION) that corresponds to 'protocol'. */
uint8_t
ofputil_protocol_to_ofp_version(enum ofputil_protocol protocol)
{
case OFPUTIL_P_NXM:
case OFPUTIL_P_NXM_TID:
return OFP10_VERSION;
+ case OFPUTIL_P_OF12:
+ return OFP12_VERSION;
}
NOT_REACHED();
case OFPUTIL_P_NXM_TID:
return enable ? OFPUTIL_P_NXM_TID : OFPUTIL_P_NXM;
+ case OFPUTIL_P_OF12:
+ return OFPUTIL_P_OF12;
+
default:
NOT_REACHED();
}
case OFPUTIL_P_NXM_TID:
return ofputil_protocol_set_tid(OFPUTIL_P_NXM, tid);
+ case OFPUTIL_P_OF12:
+ return ofputil_protocol_set_tid(OFPUTIL_P_OF12, tid);
+
default:
NOT_REACHED();
}
case OFPUTIL_P_OF10_TID:
return "OpenFlow10+table_id";
+
+ case OFPUTIL_P_OF12:
+ return NULL;
}
/* Check abbreviations. */
case OFPUTIL_P_OF10:
return ofputil_encode_nx_set_flow_format(NXFF_OPENFLOW10);
+ case OFPUTIL_P_OF12:
+ return ofputil_encode_nx_set_flow_format(NXFF_OPENFLOW12);
+
case OFPUTIL_P_OF10_TID:
case OFPUTIL_P_NXM_TID:
NOT_REACHED();
case NXFF_NXM:
return OFPUTIL_P_NXM;
+ case NXFF_OPENFLOW12:
+ return OFPUTIL_P_OF12;
+
default:
return 0;
}
return "openflow10";
case NXFF_NXM:
return "nxm";
+ case NXFF_OPENFLOW12:
+ return "openflow12";
default:
NOT_REACHED();
}
nfm->match_len = htons(match_len);
break;
+ case OFPUTIL_P_OF12:
default:
NOT_REACHED();
}
break;
}
+ case OFPUTIL_P_OF12:
default:
NOT_REACHED();
}
break;
}
+ case OFPUTIL_P_OF12:
default:
NOT_REACHED();
}
OFPUTIL_P_NXM_TID = 1 << 3, /* NXM + flow_mod_table_id extension. */
#define OFPUTIL_P_NXM_ANY (OFPUTIL_P_NXM | OFPUTIL_P_NXM_TID)
+ /* OpenFlow 1.2 */
+ OFPUTIL_P_OF12 = 1 << 4, /* OpenFlow 1.2 flow format. */
+
/* All protocols. */
#define OFPUTIL_P_ANY (OFPUTIL_P_OF10_ANY | OFPUTIL_P_NXM_ANY)