- learn_parse_spec(orig, name, value, spec);
-
- /* Check prerequisites. */
- if (spec->src_type == NX_LEARN_SRC_FIELD
- && flow && !mf_are_prereqs_ok(spec->src.field, flow)) {
- ovs_fatal(0, "%s: cannot specify source field %s because "
- "prerequisites are not satisfied",
- orig, spec->src.field->name);
- }
- if ((spec->dst_type == NX_LEARN_DST_MATCH
- || spec->dst_type == NX_LEARN_DST_LOAD)
- && !mf_are_prereqs_ok(spec->dst.field, &match.flow)) {
- ovs_fatal(0, "%s: cannot specify destination field %s because "
- "prerequisites are not satisfied",
- orig, spec->dst.field->name);
+ error = learn_parse_spec(orig, name, value, spec);
+ if (error) {
+ return error;