It is possible to pass some fields to the kernel with a zero mask, but
ovs-dpctl doesn't currently allow it. Change the code to allow it to
mimic what vswitchd is allowed to do.

Signed-off-by: Haggai Eran <hagg...@mellanox.com>
---
 lib/odp-util.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/odp-util.c b/lib/odp-util.c
index f16e113af6d0..346064d56413 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -3923,12 +3923,9 @@ geneve_to_attr(struct ofpbuf *a, const void *data_)
         SCAN_FIELD_NESTED__(NAME, TYPE, SCAN_AS, 0, FUNC)
 
 #define SCAN_PUT(ATTR, FUNC)                            \
-        if (!mask || !is_all_zeros(&smask, sizeof smask)) { \
-            SCAN_PUT_ATTR(key, ATTR, skey, FUNC);       \
-            if (mask) {                                 \
-                SCAN_PUT_ATTR(mask, ATTR, smask, FUNC); \
-            }                                           \
-        }
+        SCAN_PUT_ATTR(key, ATTR, skey, FUNC);           \
+        if (mask)                                       \
+            SCAN_PUT_ATTR(mask, ATTR, smask, FUNC);     \
 
 #define SCAN_END(ATTR)                                  \
         SCAN_FINISH();                                  \
-- 
1.7.11.2

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to