" dump-group-features SWITCH print group features\n"
" dump-groups SWITCH print group description\n"
" dump-group-stats SWITCH [GROUP] print group statistics\n"
+ " queue-get-config SWITCH PORT print queue information for port\n"
" add-meter SWITCH METER add meter described by METER\n"
" mod-meter SWITCH METER modify specific METER\n"
" del-meter SWITCH METER delete METER\n"
error = parse_ofp_flow_stats_request_str(&fsr, aggregate,
argc > 2 ? argv[2] : "",
- &usable_protocols);
+ &usable_protocols,
+ !(allowed_protocols
+ & OFPUTIL_P_OF10_ANY));
if (error) {
ovs_fatal(0, "%s", error);
}
vconn_close(vconn);
}
+static void
+ofctl_queue_get_config(int argc OVS_UNUSED, char *argv[])
+{
+ const char *vconn_name = argv[1];
+ const char *port_name = argv[2];
+ enum ofputil_protocol protocol;
+ enum ofp_version version;
+ struct ofpbuf *request;
+ struct vconn *vconn;
+ ofp_port_t port;
+
+ port = str_to_port_no(vconn_name, port_name);
+
+ protocol = open_vconn(vconn_name, &vconn);
+ version = ofputil_protocol_to_ofp_version(protocol);
+ request = ofputil_encode_queue_get_config_request(version, port);
+ dump_transaction(vconn, request);
+ vconn_close(vconn);
+}
+
static enum ofputil_protocol
open_vconn_for_flow_mod(const char *remote, struct vconn **vconnp,
enum ofputil_protocol usable_protocols)
char *error;
error = parse_ofp_flow_mod_file(argv[2], command, &fms, &n_fms,
- &usable_protocols);
+ &usable_protocols,
+ !(allowed_protocols & OFPUTIL_P_OF10_ANY));
if (error) {
ovs_fatal(0, "%s", error);
}
enum ofputil_protocol usable_protocols;
error = parse_ofp_flow_mod_str(&fm, argc > 2 ? argv[2] : "", command,
- &usable_protocols);
+ &usable_protocols,
+ !(allowed_protocols
+ & OFPUTIL_P_OF10_ANY));
if (error) {
ovs_fatal(0, "%s", error);
}
char *error;
enum ofputil_protocol usable;
- error = parse_ofp_str(&fm, OFPFC_ADD, ds_cstr(&s), &usable);
+ error = parse_ofp_str(&fm, OFPFC_ADD, ds_cstr(&s), &usable,
+ !(allowed_protocols & OFPUTIL_P_OF10_ANY));
if (error) {
ovs_fatal(0, "%s:%d: %s", filename, line_number, error);
}
struct ofputil_flow_mod fm;
char *error;
- error = parse_ofp_flow_mod_str(&fm, argv[1], OFPFC_ADD, &usable_protocols);
+ error = parse_ofp_flow_mod_str(&fm, argv[1], OFPFC_ADD, &usable_protocols,
+ !(allowed_protocols & OFPUTIL_P_OF10_ANY));
if (error) {
ovs_fatal(0, "%s", error);
}
char *error;
error = parse_ofp_flow_mod_file(argv[1], OFPFC_ADD, &fms, &n_fms,
- &usable_protocols);
+ &usable_protocols,
+ !(allowed_protocols & OFPUTIL_P_OF10_ANY));
if (error) {
ovs_fatal(0, "%s", error);
}
/* Convert to ofpacts. */
ofpbuf_init(&ofpacts, 0);
size = of11_in.size;
- error = ofpacts_pull_openflow11_actions(&of11_in, of11_in.size,
- &ofpacts);
+ error = ofpacts_pull_openflow11_actions(&of11_in, OFP11_VERSION,
+ of11_in.size, &ofpacts);
if (error) {
printf("bad OF1.1 actions: %s\n\n", ofperr_get_name(error));
ofpbuf_uninit(&ofpacts);
/* Convert to ofpacts. */
ofpbuf_init(&ofpacts, 0);
size = of11_in.size;
- error = ofpacts_pull_openflow11_instructions(&of11_in, of11_in.size,
- &ofpacts);
+ error = ofpacts_pull_openflow11_instructions(&of11_in, OFP11_VERSION,
+ of11_in.size, &ofpacts);
if (!error) {
- /* Verify actions. */
+ /* Verify actions, enforce consistency. */
struct flow flow;
memset(&flow, 0, sizeof flow);
error = ofpacts_check(ofpacts.data, ofpacts.size, &flow, OFPP_MAX,
- table_id ? atoi(table_id) : 0);
+ table_id ? atoi(table_id) : 0, true);
}
if (error) {
printf("bad OF1.1 instructions: %s\n\n", ofperr_get_name(error));
string_s = match_to_string(&match, OFP_DEFAULT_PRIORITY);
printf("%s -> ", string_s);
fflush(stdout);
- error_s = parse_ofp_str(&fm, -1, string_s, &usable_protocols);
+ error_s = parse_ofp_str(&fm, -1, string_s, &usable_protocols,
+ !(allowed_protocols & OFPUTIL_P_OF10_ANY));
if (error_s) {
ovs_fatal(0, "%s", error_s);
}
{ "dump-flows", 1, 2, ofctl_dump_flows },
{ "dump-aggregate", 1, 2, ofctl_dump_aggregate },
{ "queue-stats", 1, 3, ofctl_queue_stats },
+ { "queue-get-config", 2, 2, ofctl_queue_get_config },
{ "add-flow", 2, 2, ofctl_add_flow },
{ "add-flows", 2, 2, ofctl_add_flows },
{ "mod-flows", 2, 2, ofctl_mod_flows },