X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=inline;f=lib%2Fofp-parse.c;h=7ca730512b1df2277f3ec0f588696dda58d1bc27;hb=98cf638b19c2a5deca603fd4ed90e3b0cbfc7b7e;hp=a61beb99e05e85889287769fb31123fcfc8a1c3f;hpb=918f2b827076f3af4ae6c3f0c20b93233947cf4c;p=sliver-openvswitch.git diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index a61beb99e..7ca730512 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -38,9 +38,6 @@ #include "packets.h" #include "socket-util.h" #include "vconn.h" -#include "vlog.h" - -VLOG_DEFINE_THIS_MODULE(ofp_parse); /* Parses 'str' as an 8-bit unsigned integer into '*valuep'. * @@ -544,7 +541,7 @@ parse_metadata(struct ofpbuf *b, char *arg) return error; } } else { - om->mask = htonll(UINT64_MAX); + om->mask = OVS_BE64_MAX; } return str_to_be64(arg, &om->metadata); @@ -1149,7 +1146,7 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string, fm->cookie_mask = htonll(0); if (command == OFPFC_MODIFY || command == OFPFC_MODIFY_STRICT) { /* For modify, by default, don't update the cookie. */ - fm->new_cookie = htonll(UINT64_MAX); + fm->new_cookie = OVS_BE64_MAX; } else{ fm->new_cookie = htonll(0); } @@ -1290,7 +1287,7 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string, *usable_protocols &= OFPUTIL_P_NXM_OXM_ANY; } } - if (!fm->cookie_mask && fm->new_cookie == htonll(UINT64_MAX) + if (!fm->cookie_mask && fm->new_cookie == OVS_BE64_MAX && (command == OFPFC_MODIFY || command == OFPFC_MODIFY_STRICT)) { /* On modifies without a mask, we are supposed to add a flow if * one does not exist. If a cookie wasn't been specified, use a @@ -1370,7 +1367,7 @@ parse_ofp_meter_mod_str__(struct ofputil_meter_mod *mm, char *string, char *name; /* Meters require at least OF 1.3. */ - *usable_protocols &= OFPUTIL_P_OF13_UP; + *usable_protocols = OFPUTIL_P_OF13_UP; switch (command) { case -1: