[ovs-dev] [PATCH] ofp-parse: Ignore "idle_age" when parsing a flow string.

Justin Pettit jpettit at nicira.com
Fri Feb 1 08:14:56 UTC 2013

It should be possible to feed to output of "ovs-ofctl dump-flows" to
"ovs-ofctl add-flows".  However, some of the metadata needs to be
ignored.  "idle_age" was recently added to the output of "ovs-ofctl
dump-flows", but it was not ignored like the other metadata.  This
commit ignores it.

Signed-off-by: Justin Pettit <jpettit at nicira.com>
 lib/ofp-parse.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index 6f35c12..1c57d2f 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -914,7 +914,8 @@ parse_ofp_str(struct ofputil_flow_mod *fm, int command, const char *str_,
                 parse_field(mf_from_name(name), value, &fm->match);
             } else if (!strcmp(name, "duration")
                        || !strcmp(name, "n_packets")
-                       || !strcmp(name, "n_bytes")) {
+                       || !strcmp(name, "n_bytes")
+                       || !strcmp(name, "idle_age")) {
                 /* Ignore these, so that users can feed the output of
                  * "ovs-ofctl dump-flows" back into commands that parse
                  * flows. */

More information about the dev mailing list