ds_put_format(string, " total_len=%"PRIu16" in_port=", pin.total_len);
ofputil_format_port(pin.fmd.in_port, string);
- if (pin.fmd.tun_id_mask) {
+ if (pin.fmd.tun_id != htonll(0)) {
ds_put_format(string, " tun_id=0x%"PRIx64, ntohll(pin.fmd.tun_id));
- if (pin.fmd.tun_id_mask != htonll(UINT64_MAX)) {
- ds_put_format(string, "/0x%"PRIx64, ntohll(pin.fmd.tun_id_mask));
- }
}
- if (pin.fmd.metadata_mask) {
+ if (pin.fmd.metadata != htonll(0)) {
ds_put_format(string, " metadata=0x%"PRIx64, ntohll(pin.fmd.metadata));
- if (pin.fmd.metadata_mask != htonll(UINT64_MAX)) {
- ds_put_format(string, "/0x%"PRIx64, ntohll(pin.fmd.metadata_mask));
- }
}
for (i = 0; i < FLOW_N_REGS; i++) {
- if (pin.fmd.reg_masks[i]) {
+ if (pin.fmd.regs[i]) {
ds_put_format(string, " reg%d=0x%"PRIx32, i, pin.fmd.regs[i]);
- if (pin.fmd.reg_masks[i] != UINT32_MAX) {
- ds_put_format(string, "/0x%"PRIx32, pin.fmd.reg_masks[i]);
- }
}
}
case OFPUTIL_A_SET_NW_TOS: return "SET_NW_TOS";
case OFPUTIL_A_SET_TP_SRC: return "SET_TP_SRC";
case OFPUTIL_A_SET_TP_DST: return "SET_TP_DST";
+ case OFPUTIL_A_SET_FIELD: return "SET_FIELD";
case OFPUTIL_A_ENQUEUE: return "ENQUEUE";
case OFPUTIL_A_COPY_TTL_OUT: return "COPY_TTL_OUT";
case OFPUTIL_A_COPY_TTL_IN: return "COPY_TTL_IN";
/* nx_match_to_string() doesn't print priority. */
need_priority = true;
} else {
- cls_rule_format(&fm.cr, s);
+ match_format(&fm.match, s, fm.priority);
- /* cls_rule_format() does print priority. */
+ /* match_format() does print priority. */
need_priority = false;
}
if (fm.hard_timeout != OFP_FLOW_PERMANENT) {
ds_put_format(s, "hard:%"PRIu16" ", fm.hard_timeout);
}
- if (fm.cr.priority != OFP_DEFAULT_PRIORITY && need_priority) {
- ds_put_format(s, "pri:%"PRIu16" ", fm.cr.priority);
+ if (fm.priority != OFP_DEFAULT_PRIORITY && need_priority) {
+ ds_put_format(s, "pri:%"PRIu16" ", fm.priority);
}
if (fm.buffer_id != UINT32_MAX) {
ds_put_format(s, "buf:0x%"PRIx32" ", fm.buffer_id);
}
ds_put_char(string, ' ');
- cls_rule_format(&fr.rule, string);
+ match_format(&fr.match, string, fr.priority);
ds_put_format(string, " reason=%s",
ofp_flow_removed_reason_to_string(fr.reason));
+ if (fr.table_id != 255) {
+ ds_put_format(string, " table_id=%"PRIu8, fr.table_id);
+ }
+
if (fr.cookie != htonll(0)) {
ds_put_format(string, " cookie:0x%"PRIx64, ntohll(fr.cookie));
}
ofputil_format_port(fsr.out_port, string);
}
- /* A flow stats request doesn't include a priority, but cls_rule_format()
- * will print one unless it is OFP_DEFAULT_PRIORITY. */
- fsr.match.priority = OFP_DEFAULT_PRIORITY;
-
ds_put_char(string, ' ');
- cls_rule_format(&fsr.match, string);
+ match_format(&fsr.match, string, OFP_DEFAULT_PRIORITY);
}
void
ds_put_format(string, "hard_age=%d, ", fs->hard_age);
}
- cls_rule_format(&fs->rule, string);
+ match_format(&fs->match, string, fs->priority);
if (string->string[string->length - 1] != ' ') {
ds_put_char(string, ' ');
}
ds_put_char(string, '\n');
ofp_print_flow_stats(string, &fs);
}
+ ofpbuf_uninit(&ofpacts);
}
static void
}
ds_put_char(string, ' ');
- cls_rule_format(&request.match, string);
+ match_format(&request.match, string, OFP_DEFAULT_PRIORITY);
ds_chomp(string, ' ');
}
}
ofpbuf_use_stub(&ofpacts, ofpacts_stub, sizeof ofpacts_stub);
for (;;) {
struct ofputil_flow_update update;
- struct cls_rule match;
+ struct match match;
int retval;
update.match = &match;
ds_put_format(string, " cookie=%#"PRIx64, ntohll(update.cookie));
ds_put_char(string, ' ');
- cls_rule_format(update.match, string);
+ match_format(update.match, string, OFP_DEFAULT_PRIORITY);
if (update.ofpacts_len) {
if (string->string[string->length - 1] != ' ') {