X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fclassifier.c;h=ba10272f77a0b632a8031efd2a1e91b0d7fcc99b;hb=406e37ecf554529e9380ef06863d85ccc94009d1;hp=49058379561fbca8597dd58c5c647791abcdc6c9;hpb=07b37e8f9841d07b3c912549824457238d3508e6;p=openvswitch diff --git a/lib/classifier.c b/lib/classifier.c index 49058379..ba10272f 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -128,7 +128,7 @@ cls_rule_set_reg_masked(struct cls_rule *rule, unsigned int reg_idx, } void -cls_rule_set_tun_id(struct cls_rule *rule, ovs_be32 tun_id) +cls_rule_set_tun_id(struct cls_rule *rule, ovs_be64 tun_id) { rule->wc.wildcards &= ~FWW_TUN_ID; rule->flow.tun_id = tun_id; @@ -352,7 +352,7 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) int i; - if (rule->priority != 32768) { + if (rule->priority != OFP_DEFAULT_PRIORITY) { ds_put_format(s, "priority=%d,", rule->priority); } @@ -394,7 +394,7 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) } } if (!(w & FWW_TUN_ID)) { - ds_put_format(s, "tun_id=0x%"PRIx32",", ntohl(f->tun_id)); + ds_put_format(s, "tun_id=0x%"PRIx64",", ntohll(f->tun_id)); } if (!(w & FWW_IN_PORT)) { ds_put_format(s, "in_port=%"PRIu16",", @@ -447,9 +447,9 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) format_ip_netmask(s, "nw_dst", f->nw_dst, wc->nw_dst_mask); if (!skip_proto && !(w & FWW_NW_PROTO)) { if (f->dl_type == htons(ETH_TYPE_ARP)) { - ds_put_format(s, "arp_op=%"PRIu8, f->nw_proto); + ds_put_format(s, "opcode=%"PRIu8",", f->nw_proto); } else { - ds_put_format(s, "nw_proto=%"PRIu8, f->nw_proto); + ds_put_format(s, "nw_proto=%"PRIu8",", f->nw_proto); } } if (!(w & FWW_NW_TOS)) { @@ -457,17 +457,17 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s) } if (f->nw_proto == IP_TYPE_ICMP) { if (!(w & FWW_TP_SRC)) { - ds_put_format(s, "icmp_type=%"PRIu16, ntohs(f->tp_src)); + ds_put_format(s, "icmp_type=%"PRIu16",", ntohs(f->tp_src)); } if (!(w & FWW_TP_DST)) { - ds_put_format(s, "icmp_code=%"PRIu16, ntohs(f->tp_dst)); + ds_put_format(s, "icmp_code=%"PRIu16",", ntohs(f->tp_dst)); } } else { if (!(w & FWW_TP_SRC)) { - ds_put_format(s, "tp_src=%"PRIu16, ntohs(f->tp_src)); + ds_put_format(s, "tp_src=%"PRIu16",", ntohs(f->tp_src)); } if (!(w & FWW_TP_DST)) { - ds_put_format(s, "tp_dst=%"PRIu16, ntohs(f->tp_dst)); + ds_put_format(s, "tp_dst=%"PRIu16",", ntohs(f->tp_dst)); } } @@ -932,7 +932,7 @@ flow_equal_except(const struct flow *a, const struct flow *b, const flow_wildcards_t wc = wildcards->wildcards; int i; - BUILD_ASSERT_DECL(FLOW_SIG_SIZE == 36 + FLOW_N_REGS * 4); + BUILD_ASSERT_DECL(FLOW_SIG_SIZE == 40 + FLOW_N_REGS * 4); for (i = 0; i < FLOW_N_REGS; i++) { if ((a->regs[i] ^ b->regs[i]) & wildcards->reg_masks[i]) { @@ -968,7 +968,7 @@ zero_wildcards(struct flow *flow, const struct flow_wildcards *wildcards) const flow_wildcards_t wc = wildcards->wildcards; int i; - BUILD_ASSERT_DECL(FLOW_SIG_SIZE == 36 + 4 * FLOW_N_REGS); + BUILD_ASSERT_DECL(FLOW_SIG_SIZE == 40 + 4 * FLOW_N_REGS); for (i = 0; i < FLOW_N_REGS; i++) { flow->regs[i] &= wildcards->reg_masks[i];