if (NXM_HASMASK(header)) {
memcpy(cookie_mask, p + 4 + width, width);
} else {
- *cookie_mask = htonll(UINT64_MAX);
+ *cookie_mask = OVS_BE64_MAX;
}
error = 0;
}
case 0:
break;
- case CONSTANT_HTONS(UINT16_MAX):
+ case OVS_BE16_MAX:
nxm_put_16(b, header, value);
break;
case 0:
break;
- case CONSTANT_HTONL(UINT32_MAX):
+ case OVS_BE32_MAX:
nxm_put_32(b, header, value);
break;
case 0:
break;
- case CONSTANT_HTONLL(UINT64_MAX):
+ case OVS_BE64_MAX:
nxm_put_64(b, header, value);
break;
flow->tp_src, match->wc.masks.tp_src);
nxm_put_16m(b, oxm ? OXM_OF_UDP_DST : NXM_OF_UDP_DST,
flow->tp_dst, match->wc.masks.tp_dst);
+ } else if (flow->nw_proto == IPPROTO_SCTP) {
+ nxm_put_16m(b, OXM_OF_SCTP_SRC, flow->tp_src,
+ match->wc.masks.tp_src);
+ nxm_put_16m(b, OXM_OF_SCTP_DST, flow->tp_dst,
+ match->wc.masks.tp_dst);
} else if (flow->nw_proto == icmp_proto) {
if (match->wc.masks.tp_src) {
nxm_put_8(b, icmp_type, ntohs(flow->tp_src));
int match_len;
int i;
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 20);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 21);
/* Metadata. */
if (match->wc.masks.in_port.ofp_port) {
/* ofp12_action_set_field is padded to 64 bits by zero */
if (oasf_len != ROUND_UP(sizeof(*oasf) + oxm_length, 8)) {
- return OFPERR_OFPBAC_BAD_ARGUMENT;
+ return OFPERR_OFPBAC_BAD_SET_LEN;
}
if (!is_all_zeros((const uint8_t *)(oasf) + sizeof *oasf + oxm_length,
oasf_len - oxm_length - sizeof *oasf)) {
- return OFPERR_OFPBAC_BAD_ARGUMENT;
+ return OFPERR_OFPBAC_BAD_SET_ARGUMENT;
}
if (NXM_HASMASK(oxm_header)) {
- return OFPERR_OFPBAC_BAD_ARGUMENT;
+ return OFPERR_OFPBAC_BAD_SET_TYPE;
}
mf = mf_from_nxm_header(oxm_header);
if (!mf) {
- return OFPERR_OFPBAC_BAD_ARGUMENT;
+ return OFPERR_OFPBAC_BAD_SET_TYPE;
}
load = ofpact_put_REG_LOAD(ofpacts);
ofpact_set_field_init(load, mf, oasf + 1);