diff mbox series

[ovs-dev] dpif-netdev: Add miniflow bits to dump-flows.

Message ID 1589465498-68144-1-git-send-email-u9012063@gmail.com
State New
Headers show
Series [ovs-dev] dpif-netdev: Add miniflow bits to dump-flows. | expand

Commit Message

William Tu May 14, 2020, 2:11 p.m. UTC
The 'dpctl/dump-flows -m' only shows the number of 1-bit in the
miniflow map, the patch outputs additional miniflow bits after it.
The format will be

By searching the unique miniflow bits, we know the number of subtables,
and for earch subtables, the fields it matches on.

Cc: Emma Finn <emma.finn@intel.com>
Cc: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: William Tu <u9012063@gmail.com>
 lib/dpif-netdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 51c888501bdf..b618b07be0c8 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3352,8 +3352,9 @@  dp_netdev_flow_add(struct dp_netdev_pmd_thread *pmd,
         if (unit) {
             ds_put_char(&extra_info, ',');
-        ds_put_format(&extra_info, "%d",
-                      count_1bits(flow->cr.mask->mf.map.bits[unit]));
+        ds_put_format(&extra_info, "%d:0x%llx",
+                      count_1bits(flow->cr.mask->mf.map.bits[unit]),
+                      flow->cr.mask->mf.map.bits[unit]);
     ds_put_char(&extra_info, ')');
     flow->dp_extra_info = ds_steal_cstr(&extra_info);