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 1D2664239C; Wed, 11 Jan 2023 06:38:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A03842C24; Wed, 11 Jan 2023 06:38:29 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C83D242BD9 for ; Wed, 11 Jan 2023 06:38:27 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30B15ZY9023925 for ; Tue, 10 Jan 2023 21:38:27 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=w+TJp6iC2qnW+G2NXXdvAXMgbdbDpbVHt9bsd/31nls=; b=eSAvdKErW2ZHXzNH9Dz3h7xs0i0KzAFpxc5boqBceMQ5AID8c2wRmwvVBw0juhjDdo07 VvuaP2NS/47Qtn4b9K4lOII/1TQmsL5F3sTrDugK1YIxAoZUeWx6emLNlAfysmrDWWvn w7FipklY1n6celH33tqwcljs9/qfi5QsMGQoAi+6srCZ/E4iEO9aICjOUM/C58p0E7yR bAGCps7R2b7Ktc8MTKsUZeV9FWMmcDRvvYpZTsMeAZ/s7txJj/lApsEbJKab1svPMruI R8LHcW5sAWu/pyDiVPyvquTl1Lktc+HtU5Jku0X7bdiR3TLZscFi2Wk5IN/CDqavLDCa rg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3n1k55gjde-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 10 Jan 2023 21:38:26 -0800 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.42; Tue, 10 Jan 2023 21:38:25 -0800 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.42 via Frontend Transport; Tue, 10 Jan 2023 21:38:25 -0800 Received: from satheeshpaullabpc.. (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 4A9E05B6921; Tue, 10 Jan 2023 21:38:23 -0800 (PST) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul Subject: [dpdk-dev] [PATCH v2 2/4] net/cnxk: introduce flag for flow validate Date: Wed, 11 Jan 2023 11:08:12 +0530 Message-ID: <20230111053814.979400-2-psatheesh@marvell.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230111053814.979400-1-psatheesh@marvell.com> References: <20221201042011.2977887-1-psatheesh@marvell.com> <20230111053814.979400-1-psatheesh@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: FxkoHiK5rpYh6qGzVBPnYI2topXA3MGe X-Proofpoint-ORIG-GUID: FxkoHiK5rpYh6qGzVBPnYI2topXA3MGe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-11_01,2023-01-10_03,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Kiran Kumar K Add a flag to check flow validate. In case of MSNS don't need to configure the API to SA translation while validating the flow. Skip this with a check. Signed-off-by: Kiran Kumar K Reviewed-by: Satheesh Paul --- drivers/net/cnxk/cnxk_flow.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c index 6d155d924c..bf4c55f00a 100644 --- a/drivers/net/cnxk/cnxk_flow.c +++ b/drivers/net/cnxk/cnxk_flow.c @@ -299,12 +299,13 @@ cnxk_flow_validate(struct rte_eth_dev *eth_dev, int rc; memset(&flow, 0, sizeof(flow)); + flow.is_validate = true; - rc = cnxk_map_flow_data(eth_dev, attr, pattern, actions, &in_attr, - in_pattern, in_actions, &flowkey_cfg); + rc = cnxk_map_flow_data(eth_dev, attr, pattern, actions, &in_attr, in_pattern, in_actions, + &flowkey_cfg); if (rc) { - rte_flow_error_set(error, 0, RTE_FLOW_ERROR_TYPE_ACTION_NUM, - NULL, "Failed to map flow data"); + rte_flow_error_set(error, 0, RTE_FLOW_ERROR_TYPE_ACTION_NUM, NULL, + "Failed to map flow data"); return rc; } -- 2.35.3