ds_put_char_multiple(result, '\t', level);
ds_put_format(result, "%s:", title);
for (i = 0; i < FLOW_N_REGS; i++) {
- ds_put_format(result, " reg%zu=0x%"PRIx32, i, trace->flow.regs[i]);
+ ds_put_format(result, " reg%"PRIuSIZE"=0x%"PRIx32, i, trace->flow.regs[i]);
}
ds_put_char(result, '\n');
}
}
/* OpenFlow 1.1 and later suggest that the switch enforces certain forms of
- * consistency between the flow and the actions, so enforce these by
- * default if the actions can only work in OF1.1 or later. */
- enforce_consistency = !(usable_protocols & OFPUTIL_P_OF10_ANY);
+ * consistency between the flow and the actions. With -consistent, we
+ * enforce consistency even for a flow supported in OpenFlow 1.0. */
if (!strcmp(argv[1], "-consistent")) {
enforce_consistency = true;
argv++;
argc--;
+ } else {
+ enforce_consistency = false;
}
error = parse_flow_and_packet(argc, argv, &ofproto, &flow, &packet);
unixctl_command_reply_error(conn, "invalid in_port");
goto exit;
}
- retval = ofpacts_check(ofpacts.data, ofpacts.size, &flow,
- enforce_consistency,
- u16_to_ofp(ofproto->up.max_ports), 0, 0);
+ if (enforce_consistency) {
+ retval = ofpacts_check_consistency(ofpacts.data, ofpacts.size, &flow,
+ u16_to_ofp(ofproto->up.max_ports),
+ 0, 0, usable_protocols);
+ } else {
+ retval = ofpacts_check(ofpacts.data, ofpacts.size, &flow,
+ u16_to_ofp(ofproto->up.max_ports), 0, 0,
+ &usable_protocols);
+ }
+
if (retval) {
ds_clear(&result);
ds_put_format(&result, "Bad actions: %s", ofperr_to_string(retval));
ds_put_format(ds, "%s: hit:%"PRIu64" missed:%"PRIu64"\n",
dpif_name(backer->dpif), n_hit, n_missed);
- ds_put_format(ds, "\tflows: cur: %zu, avg: %u, max: %u,"
+ ds_put_format(ds, "\tflows: cur: %"PRIuSIZE", avg: %u, max: %u,"
" life span: %lldms\n", hmap_count(&backer->subfacets),
backer->avg_n_subfacet, backer->max_n_subfacet,
backer->avg_subfacet_life);
CLS_CURSOR_FOR_EACH (facet, cr, &cursor) {
cls_rule_format(&facet->cr, &ds);
ds_put_cstr(&ds, ", ");
- ds_put_format(&ds, "n_subfacets:%zu, ", list_size(&facet->subfacets));
+ ds_put_format(&ds, "n_subfacets:%"PRIuSIZE", ", list_size(&facet->subfacets));
ds_put_format(&ds, "used:%.3fs, ", (now - facet->used) / 1000.0);
ds_put_cstr(&ds, "Datapath actions: ");
if (facet->xout.slow) {