X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fflow.c;h=e7ed2a97efe1b33e58d72765653289cea61573c6;hb=ea83a2fcd0d31246ece7bdea4c54e162f432e81c;hp=8922562866e21dd72bdc5763bdef13169d2949f8;hpb=d76f09ea77e03ee5a3a7bb67bcab1ac4bb54172b;p=sliver-openvswitch.git diff --git a/lib/flow.c b/lib/flow.c index 892256286..e7ed2a97e 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -138,7 +138,7 @@ parse_ethertype(struct ofpbuf *b) * present and has a correct length, and otherwise NULL. */ int -flow_extract(struct ofpbuf *packet, ovs_be32 tun_id, uint16_t in_port, +flow_extract(struct ofpbuf *packet, ovs_be64 tun_id, uint16_t in_port, struct flow *flow) { struct ofpbuf b = *packet; @@ -261,8 +261,8 @@ flow_to_string(const struct flow *flow) void flow_format(struct ds *ds, const struct flow *flow) { - ds_put_format(ds, "tunnel%08"PRIx32":in_port%04"PRIx16":tci(", - ntohl(flow->tun_id), flow->in_port); + ds_put_format(ds, "tunnel%#"PRIx64":in_port%04"PRIx16":tci(", + flow->tun_id, flow->in_port); if (flow->vlan_tci) { ds_put_format(ds, "vlan%"PRIu16",pcp%d", vlan_tci_to_vid(flow->vlan_tci), @@ -306,6 +306,7 @@ flow_wildcards_init_catchall(struct flow_wildcards *wc) wc->nw_dst_mask = htonl(0); memset(wc->reg_masks, 0, sizeof wc->reg_masks); wc->vlan_tci_mask = htons(0); + wc->zero = 0; } /* Initializes 'wc' as an exact-match set of wildcards; that is, 'wc' does not @@ -318,6 +319,7 @@ flow_wildcards_init_exact(struct flow_wildcards *wc) wc->nw_dst_mask = htonl(UINT32_MAX); memset(wc->reg_masks, 0xff, sizeof wc->reg_masks); wc->vlan_tci_mask = htons(UINT16_MAX); + wc->zero = 0; } /* Returns true if 'wc' is exact-match, false if 'wc' wildcards any bits or