[ovs-dev] [PATCH] odp-util: Fix Sparse warning in parse_odp_userspace_action().

Justin Pettit jpettit at ovn.org
Thu Jan 11 19:01:23 UTC 2018


Sparse complains with warning: incorrect type in argument 1 (different
base types) in function parse_odp_userspace_action due to a call to
htonll(rule_cookie).  The variable is read in host-byte order, so it
shouldn't have been declared as big-endian.

Fixes: d39ec23de384 ("ofproto-dpif: Don't slow-path controller actions.")
Reported-by: Ian Stokes <ian.stokes at intel.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>
---
 lib/odp-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/odp-util.c b/lib/odp-util.c
index f8c84e17330f..0b836569fdc5 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -1151,7 +1151,7 @@ parse_odp_userspace_action(const char *s, struct ofpbuf *actions)
         uint8_t continuation;
         uint16_t reason;
         uint32_t recirc_id;
-        ovs_be64 rule_cookie;
+        uint64_t rule_cookie;
         uint16_t controller_id;
         uint16_t max_len;
 
-- 
2.7.4



More information about the dev mailing list