[2/2] net/cnxk: add validate flag for RTE flow for cnxk
Checks
Commit Message
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(-)
@@ -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;
}