]> git.proxmox.com Git - ovs.git/commitdiff
dpctl: Don't print UFID if not present.
authorJoe Stringer <joestringer@nicira.com>
Fri, 22 May 2015 17:24:34 +0000 (10:24 -0700)
committerJoe Stringer <joestringer@nicira.com>
Fri, 22 May 2015 21:39:17 +0000 (14:39 -0700)
With verbose dpctl, if userspace runs against an older kernel, every
entry will have "ufid:<empty>" at the beginning. This is unnecessary and
introduces an additional format for scripts to parse. Drop it.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/dpctl.c

index e95483e9f72acabe292362829f07e1b1969c250b..a5974553234abeb075f277db054f0c101776ea2f 100644 (file)
@@ -709,13 +709,9 @@ static void
 format_dpif_flow(struct ds *ds, const struct dpif_flow *f, struct hmap *ports,
                  struct dpctl_params *dpctl_p)
 {
-    if (dpctl_p->verbosity) {
-        if (f->ufid_present) {
-            odp_format_ufid(&f->ufid, ds);
-            ds_put_cstr(ds, ", ");
-        } else {
-            ds_put_cstr(ds, "ufid:<empty>, ");
-        }
+    if (dpctl_p->verbosity && f->ufid_present) {
+        odp_format_ufid(&f->ufid, ds);
+        ds_put_cstr(ds, ", ");
     }
     odp_flow_format(f->key, f->key_len, f->mask, f->mask_len, ports, ds,
                     dpctl_p->verbosity);