2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

odp-util: Accept fields with zero mask

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 <haggaie@mellanox.com>
Signed-off-by: Jesse Gross <jesse@kernel.org>
This commit is contained in:
Haggai Eran
2016-01-14 13:29:07 +02:00
committed by Jesse Gross
parent f18d4462c5
commit 00ec40176a

View File

@@ -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(); \