+ VLOG_WARN_RL(&rl, "invalid destination field");
+ } else if (!dst->writable) {
+ VLOG_WARN_RL(&rl, "destination field is not writable");
+ } else if (n_bits < min_n_bits) {
+ VLOG_WARN_RL(&rl, "insufficient bits in destination");
+ } else {
+ return 0;
+ }
+
+ return BAD_ARGUMENT;
+}
+
+int
+nxm_check_reg_load(const struct nx_action_reg_load *action,
+ const struct flow *flow)
+{
+ int n_bits;
+ int error;
+
+ error = nxm_dst_check(action->dst, action->ofs_nbits, 0, flow);
+ if (error) {
+ return error;