vec_add2 (actions, action, 1);
action->type = RTE_FLOW_ACTION_TYPE_END;
+ rv = rte_flow_validate (xd->device_index, &ingress, items, actions,
+ &xd->last_flow_error);
+ if (rv != 0)
+ {
+ if (rv == -EINVAL)
+ rv = VNET_FLOW_ERROR_NOT_SUPPORTED;
+ else if (rv == -EEXIST)
+ rv = VNET_FLOW_ERROR_ALREADY_EXISTS;
+ else
+ rv = VNET_FLOW_ERROR_INTERNAL;
+
+ goto done;
+ }
+
fe->handle = rte_flow_create (xd->device_index, &ingress, items, actions,
&xd->last_flow_error);
- if (!fe->handle)
- rv = VNET_FLOW_ERROR_NOT_SUPPORTED;
-
done:
vec_free (items);
vec_free (actions);