X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fflow.c;h=ebbd927aeb1fcfd33708ddb07ad0f0bee730826f;hb=05abb769d32d440dbd521e99484d8418f95431bd;hp=099740dcda6e2d4e4db5f5998af5d9bf7638a1a5;hpb=9ea5d2d58ba8783271d096d417082a8372b87c5d;p=openvswitch diff --git a/lib/flow.c b/lib/flow.c index 099740dc..ebbd927a 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -34,6 +34,8 @@ VLOG_DEFINE_THIS_MODULE(flow); +COVERAGE_DEFINE(flow_extract); + static struct arp_eth_header * pull_arp(struct ofpbuf *packet) { @@ -259,7 +261,7 @@ 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(", + ds_put_format(ds, "tunnel%#"PRIx32":in_port%04"PRIx16":tci(", ntohl(flow->tun_id), flow->in_port); if (flow->vlan_tci) { ds_put_format(ds, "vlan%"PRIu16",pcp%d", @@ -304,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 @@ -316,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