diff mbox series

[ovs-dev,05/25] dpif-netdev: Add mega ufid in flow add log

Message ID 20200120150830.16262-6-elibr@mellanox.com
State Under Review
Delegated to: Ilya Maximets
Headers show
Series netdev datapath vxlan offload | expand

Commit Message

Eli Britstein Jan. 20, 2020, 3:08 p.m. UTC
As offload is done using the mega ufid of a flow, for better
debugability, add it in the log message.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roni Bar Yanai <roniba@mellanox.com>
---
 lib/dpif-netdev.c       | 2 ++
 tests/dpif-netdev.at    | 2 ++
 tests/ofproto-macros.at | 3 ++-
 3 files changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 7f1671084..8e6b14d35 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3378,6 +3378,8 @@  dp_netdev_flow_add(struct dp_netdev_pmd_thread *pmd,
 
         ds_put_cstr(&ds, "flow_add: ");
         odp_format_ufid(ufid, &ds);
+        ds_put_cstr(&ds, " mega_");
+        odp_format_ufid(&flow->mega_ufid, &ds);
         ds_put_cstr(&ds, " ");
         odp_flow_format(key_buf.data, key_buf.size,
                         mask_buf.data, mask_buf.size,
diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at
index 0aeb4e788..bda1f6707 100644
--- a/tests/dpif-netdev.at
+++ b/tests/dpif-netdev.at
@@ -13,6 +13,7 @@  strip_timers () {
 
 strip_xout () {
     sed '
+    s/mega_ufid:[-0-9a-f]* //
     s/ufid:[-0-9a-f]* //
     s/used:[0-9]*\.[0-9]*/used:0.0/
     s/actions:.*/actions: <del>/
@@ -23,6 +24,7 @@  strip_xout () {
 
 strip_xout_keep_actions () {
     sed '
+    s/mega_ufid:[-0-9a-f]* //
     s/ufid:[-0-9a-f]* //
     s/used:[0-9]*\.[0-9]*/used:0.0/
     s/packets:[0-9]*/packets:0/
diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
index b2b17eed3..87f9ae280 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -131,7 +131,8 @@  strip_duration () {
 # Strips 'ufid:...' from output, to make it easier to compare.
 # (ufids are random.)
 strip_ufid () {
-    sed 's/ufid:[[-0-9a-f]]* //'
+    sed 's/mega_ufid:[[-0-9a-f]]* //
+    s/ufid:[[-0-9a-f]]* //'
 }
 m4_divert_pop([PREPARE_TESTS])