From: Satheesh Paul Date: Tue, 19 Apr 2022 06:34:38 +0000 (+0530) Subject: net/cnxk: add message on flow parsing failure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c8647cd7f3260eec8d55ee392240dcc10f7c0a4b;p=dpdk.git net/cnxk: add message on flow parsing failure 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 Reviewed-by: Kiran Kumar K --- diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c index ff962c141d..1034a2c5a4 100644 --- a/drivers/net/cnxk/cnxk_flow.c +++ b/drivers/net/cnxk/cnxk_flow.c @@ -299,7 +299,14 @@ cnxk_flow_validate(struct rte_eth_dev *eth_dev, 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 *