#include <stdlib.h>
#include "byte-order.h"
#include "classifier.h"
+#include "multipath.h"
#include "nx-match.h"
#include "ofp-util.h"
#include "ofpbuf.h"
wc->nw_dst_mask = ofputil_wcbits_to_netmask(ofpfw >> OFPFW_NW_DST_SHIFT);
if (flow_format == NXFF_TUN_ID_FROM_COOKIE && !(ofpfw & NXFW_TUN_ID)) {
- rule->flow.tun_id = htonl(ntohll(cookie) >> 32);
+ rule->flow.tun_id = htonll(ntohll(cookie) >> 32);
} else {
wc->wildcards |= FWW_TUN_ID;
- rule->flow.tun_id = htonl(0);
+ rule->flow.tun_id = htonll(0);
}
if (ofpfw & OFPFW_DL_DST) {
ofpfw |= NXFW_TUN_ID;
} else {
uint32_t cookie_lo = ntohll(cookie_in);
- uint32_t cookie_hi = ntohl(rule->flow.tun_id);
+ uint32_t cookie_hi = ntohll(rule->flow.tun_id);
cookie_in = htonll(cookie_lo | ((uint64_t) cookie_hi << 32));
}
}
}
}
- VLOG_WARN_RL(&bad_ofmsg_rl, "received %s of unknown type %u",
+ VLOG_WARN_RL(&bad_ofmsg_rl, "received %s of unknown type %"PRIu32,
cat->name, value);
return cat->missing_error;
}
};
static const struct ofputil_msg_category nxst_request_category = {
- "Nicira extension statistics",
+ "Nicira extension statistics request",
nxst_requests, ARRAY_SIZE(nxst_requests),
OFP_MKERR(OFPET_BAD_REQUEST, OFPBRC_BAD_SUBTYPE)
};
};
static const struct ofputil_msg_category nxst_reply_category = {
- "Nicira extension statistics",
+ "Nicira extension statistics reply",
nxst_replies, ARRAY_SIZE(nxst_replies),
OFP_MKERR(OFPET_BAD_REQUEST, OFPBRC_BAD_SUBTYPE)
};
|| !regs_fully_wildcarded(wc)
|| (!(wc->wildcards & FWW_TUN_ID)
&& (!cookie_support
- || (cookie_hi && cookie_hi != rule->flow.tun_id)))) {
+ || (cookie_hi && cookie_hi != ntohll(rule->flow.tun_id))))) {
return NXFF_NXM;
} else if (!(wc->wildcards & FWW_TUN_ID)) {
return NXFF_TUN_ID_FROM_COOKIE;
} else if (flow_format == NXFF_NXM) {
struct nx_flow_stats_request *nfsr;
int match_len;
+ int subtype;
- ofputil_make_nxstats_request(sizeof *nfsr, NXST_FLOW, &msg);
+ subtype = fsr->aggregate ? NXST_AGGREGATE : NXST_FLOW;
+ ofputil_make_nxstats_request(sizeof *nfsr, subtype, &msg);
match_len = nx_put_match(msg, &fsr->match);
nfsr = msg->data;
case NXAST_NOTE:
return 0;
+ case NXAST_SET_TUNNEL64:
+ return check_action_exact_len(a, len,
+ sizeof(struct nx_action_set_tunnel64));
+
+ case NXAST_MULTIPATH:
+ error = check_action_exact_len(a, len,
+ sizeof(struct nx_action_multipath));
+ if (error) {
+ return error;
+ }
+ return multipath_check((const struct nx_action_multipath *) a);
+
case NXAST_SNAT__OBSOLETE:
default:
return ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_VENDOR_TYPE);