])
OVS_VSWITCHD_STOP
AT_CLEANUP
+
+AT_SETUP([ovs-ofctl -F and -O interaction])
+AT_CHECK([ovs-ofctl -F oxm -O openflow10], [1], [],
+ [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow10) supports any of the enabled flow formats (OXM). (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
+])
+AT_CHECK([ovs-ofctl -F oxm -O openflow11], [1], [],
+ [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow11) supports any of the enabled flow formats (OXM). (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
+])
+AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow11], [1], [],
+ [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow10, OpenFlow11) supports any of the enabled flow formats (OXM). (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
+])
+AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow12], [1], [],
+ [ovs-ofctl: missing command name; use --help for help
+])
+AT_CHECK([ovs-ofctl -F oxm -O openflow12], [1], [],
+ [ovs-ofctl: missing command name; use --help for help
+])
+AT_CHECK([ovs-ofctl -F oxm -O openflow13], [1], [],
+ [ovs-ofctl: missing command name; use --help for help
+])
+AT_CLEANUP
{NULL, 0, NULL, 0},
};
char *short_options = long_options_to_short_options(long_options);
+ uint32_t versions;
+ enum ofputil_protocol version_protocols;
for (;;) {
unsigned long int timeout;
}
free(short_options);
+
+ versions = get_allowed_ofp_versions();
+ version_protocols = ofputil_protocols_from_version_bitmap(versions);
+ if (!(allowed_protocols & version_protocols)) {
+ char *protocols = ofputil_protocols_to_string(allowed_protocols);
+ struct ds version_s = DS_EMPTY_INITIALIZER;
+
+ ofputil_format_version_bitmap_names(&version_s, versions);
+ ovs_fatal(0, "None of the enabled OpenFlow versions (%s) supports "
+ "any of the enabled flow formats (%s). (Use -O to enable "
+ "additional OpenFlow versions or -F to enable additional "
+ "flow formats.)", ds_cstr(&version_s), protocols);
+ }
+ allowed_protocols &= version_protocols;
+ mask_allowed_ofp_versions(ofputil_protocols_to_version_bitmap(
+ allowed_protocols));
}
static void