[v2,2/4] net/cnxk: introduce flag for flow validate

Message ID 20230111053814.979400-2-psatheesh@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v2,1/4] common/cnxk: support SPI to SA index |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Satheesh Paul Antonysamy Jan. 11, 2023, 5:38 a.m. UTC
  From: Kiran Kumar K <kirankumark@marvell.com>

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 <kirankumark@marvell.com>
Reviewed-by: Satheesh Paul <psatheesh@marvell.com>
---
 drivers/net/cnxk/cnxk_flow.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
  

Patch

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;
 	}