- uint32_t dst = ntohl(ap->dst);
- int ofs = nxm_decode_ofs(ap->ofs_nbits);
- int n_bits = nxm_decode_n_bits(ap->ofs_nbits);
-
- if (!NXM_IS_NX_REG(dst) || NXM_NX_REG_IDX(dst) >= FLOW_N_REGS) {
- VLOG_WARN_RL(&rl, "unsupported destination field %#"PRIx32, dst);
- } else if (ofs + n_bits > nxm_field_bits(dst)) {
- VLOG_WARN_RL(&rl, "destination overflows output field");
- } else if (n_bits < 16) {
- VLOG_WARN_RL(&rl, "minimum of 16 bits required in output field");
- } else {
- return 0;
- }
-
- return ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_ARGUMENT);
+ return nxm_dst_check(ap->dst, ap->ofs_nbits, 16, flow);