From: Kiran Kumar K <kirankum...@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 <kirankum...@marvell.com>
Reviewed-by: Satheesh Paul <psathe...@marvell.com>
---
 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

Reply via email to