From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31D65A00C3 for ; Tue, 19 Apr 2022 08:34:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29C4E41156; Tue, 19 Apr 2022 08:34:54 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 6CA7E40150; Tue, 19 Apr 2022 08:34:51 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23INITMO010017; Mon, 18 Apr 2022 23:34:50 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=w3rO8jpEEN205A6fqNBtTV/KRB2U1CDTPvqf0jZV5lo=; b=MJr9KWWlKYWVwjPClxWiwscmVntlKnYnUDShXqVmWB0gjqUpl4zLxtWmyHDnq+KjipUI Aye34qTbAZZQt1L4mxACk+rs8O+cIA422jReYdBZv3DylYmNcY3SjvWGcoZ1ctYlBW9i uxz6yz0Aigpw5YHMGDBJqLNpRr1Vc1/hRre1HTgGHeIatobdCFpi2j3QKWQ+PHdPZf5t r651GTbnLNY7ZEMsGo1PhfuCG33Xv9D6/P9+3rblQ0lbylHn7BH6LeL+SAagXaF3VrVB b+kbk8AJ1ca8thpyhvvMH/D8FC8cNwuvOckbKWYZ50uTZEu3uP5XPR4dHySb/vXhKNlb jA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ffwap29hp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 18 Apr 2022 23:34:50 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 18 Apr 2022 23:34:48 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 18 Apr 2022 23:34:48 -0700 Received: from localhost.localdomain (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 44A835B6922; Mon, 18 Apr 2022 23:34:46 -0700 (PDT) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul , Subject: [dpdk-dev] [PATCH] net/cnxk: fix error message setting on failure Date: Tue, 19 Apr 2022 12:04:38 +0530 Message-ID: <20220419063438.269086-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: ygbhXbokHwGrkZ001Y86FZE2BHcFP8nW X-Proofpoint-ORIG-GUID: ygbhXbokHwGrkZ001Y86FZE2BHcFP8nW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-19_02,2022-04-15_01,2022-02-23_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Satheesh Paul 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 Kokkilagadda --- drivers/net/cnxk/cnxk_flow.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c index 8763ca63d6..2b13352312 100644 --- a/drivers/net/cnxk/cnxk_flow.c +++ b/drivers/net/cnxk/cnxk_flow.c @@ -297,7 +297,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 * -- 2.25.4