X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-parse.c;h=3a1fcb7df1df9cf5a304ade26dfc1259392fad30;hb=816fd533f85923c03cf8d9d6450bd9a0845d5160;hp=5321364b125412071d3f819086f4eb3dd8589e12;hpb=6cc7ea5ea05a71f01526577439ebedcc133f99cd;p=sliver-openvswitch.git diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 5321364b1..3a1fcb7df 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -151,14 +151,13 @@ parse_output(struct ofpbuf *b, char *arg) { if (strchr(arg, '[')) { struct nx_action_output_reg *naor; - int ofs, n_bits; - uint32_t src; + struct mf_subfield src; - nxm_parse_field_bits(arg, &src, &ofs, &n_bits); + mf_parse_subfield(&src, arg); naor = ofputil_put_NXAST_OUTPUT_REG(b); - naor->ofs_nbits = nxm_encode_ofs_nbits(ofs, n_bits); - naor->src = htonl(src); + naor->ofs_nbits = nxm_encode_ofs_nbits(src.ofs, src.n_bits); + naor->src = htonl(src.field->nxm_header); naor->max_len = htons(UINT16_MAX); } else { put_output_action(b, str_to_u32(arg));