ofproto-dpif: Print slow path actions in dpif/dump-megaflows.
authorJustin Pettit <jpettit@nicira.com>
Wed, 12 Jun 2013 05:54:50 +0000 (22:54 -0700)
committerJustin Pettit <jpettit@nicira.com>
Wed, 12 Jun 2013 06:10:18 +0000 (23:10 -0700)
It's often helpful to see what the slow path actions actual are.  Print
them when "ovs-appctl dpif/dump-megaflows" is called.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif.c

index 53f4af8..63f2252 100644 (file)
@@ -8689,8 +8689,19 @@ ofproto_unixctl_dpif_dump_megaflows(struct unixctl_conn *conn,
                       list_size(&facet->subfacets));
         ds_put_format(&ds, "used:%.3fs, ", (now - facet->used) / 1000.0);
         ds_put_cstr(&ds, "Datapath actions: ");
-        format_odp_actions(&ds, facet->xout.odp_actions.data,
-                           facet->xout.odp_actions.size);
+        if (facet->xout.slow) {
+            uint64_t slow_path_stub[128 / 8];
+            const struct nlattr *actions;
+            size_t actions_len;
+
+            compose_slow_path(ofproto, &facet->flow, facet->xout.slow,
+                              slow_path_stub, sizeof slow_path_stub,
+                              &actions, &actions_len);
+            format_odp_actions(&ds, actions, actions_len);
+        } else {
+            format_odp_actions(&ds, facet->xout.odp_actions.data,
+                               facet->xout.odp_actions.size);
+        }
         ds_put_cstr(&ds, "\n");
     }