static void nxm_put_frag(struct ofpbuf *b, const struct match *match, enum ofp_version oxm) { uint32_t header = mf_oxm_header(MFF_IP_FRAG, oxm); uint8_t nw_frag = match->flow.nw_frag; uint8_t nw_frag_mask = match->wc.masks.nw_frag; switch (nw_frag_mask) { case 0: break; case FLOW_NW_FRAG_MASK: nxm_put_8(b, header, nw_frag); break; default: nxm_put_8m(b, header, nw_frag, nw_frag_mask & FLOW_NW_FRAG_MASK); break; } }
static void nxm_put_frag(struct ofpbuf *b, const struct match *match) { uint8_t nw_frag = match->flow.nw_frag; uint8_t nw_frag_mask = match->wc.masks.nw_frag; switch (nw_frag_mask) { case 0: break; case FLOW_NW_FRAG_MASK: nxm_put_8(b, NXM_NX_IP_FRAG, nw_frag); break; default: nxm_put_8m(b, NXM_NX_IP_FRAG, nw_frag, nw_frag_mask & FLOW_NW_FRAG_MASK); break; } }