Set the error message with rte_flow_error_set() API
when flow parsing fails.
Fixes: 8c009b4505e ("net/cnxk: support flow API")
Cc: stable@dpdk.org
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
return rc;
}
- return roc_npc_flow_parse(npc, &in_attr, in_pattern, in_actions, &flow);
+ rc = roc_npc_flow_parse(npc, &in_attr, in_pattern, in_actions, &flow);
+
+ if (rc) {
+ rte_flow_error_set(error, 0, rc, NULL,
+ "Flow validation failed");
+ return rc;
+ }
+ return 0;
}
struct roc_npc_flow *