- dst = nxm_field_lookup(ntohl(action->dst));
- if (!field_ok(dst, flow, ntohs(action->dst_ofs) + ntohs(action->n_bits))) {
- return BAD_ARGUMENT;
- }
+/* Given a flow, checks that the source field represented by 'src_header'
+ * in the range ['ofs', 'ofs' + 'n_bits') is valid. */
+int
+nxm_src_check(ovs_be32 src_header, unsigned int ofs, unsigned int n_bits,
+ const struct flow *flow)
+{
+ const struct nxm_field *src = nxm_field_lookup(ntohl(src_header));