diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-06-08 13:35:00 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-06-14 11:21:52 -0700 |
| commit | 2c6d841118a6b14cc5b03fc3b549143a6b7ce143 (patch) | |
| tree | 4b6e2fdadb22b3edf82d899556d265e7e7dd3ae3 /lib/ofp-parse.c | |
| parent | e896c2d42dbb84d1e29504b0b1ed5449f007dea5 (diff) | |
| download | openvswitch-2c6d841118a6b14cc5b03fc3b549143a6b7ce143.tar.gz | |
ofp-parse: Ignore extra fields produced by dump-flows.
It's reasonable to want to dump a flow table with "dump-flows" and then
later use that output as input to other commands that read flows, but until
now that hasn't been directly possible because "dump-flows" adds extra
fields that other commands reject on input. This changes the flow parser
to just ignore those extra fields.
Diffstat (limited to 'lib/ofp-parse.c')
| -rw-r--r-- | lib/ofp-parse.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index efcfab07e..a4679a3ac 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -878,6 +878,12 @@ parse_ofp_str(struct flow_mod *fm, struct ofpbuf *actions, char *string) ovs_fatal(0, "only %d registers supported", FLOW_N_REGS); } parse_reg_value(&fm->cr, reg_idx, value); + } else if (!strcmp(name, "duration") + || !strcmp(name, "n_packets") + || !strcmp(name, "n_bytes")) { + /* Ignore these, so that users can feed the output of + * "ovs-ofctl dump-flows" back into commands that parse + * flows. */ } else { ovs_fatal(0, "unknown keyword %s", name); } |
