[PATCH] net/nfp: fix offload drop flow rule failed

Chaoyong He chaoyong.he at corigine.com
Mon Jul 8 07:37:24 CEST 2024


From: Long Wu <long.wu at corigine.com>

The issue is caused by an invalid exit logic in flow compile function.

Fixes: 4839d4b4e180 ("net/nfp: forbid offload flow rules with empty action list")
Cc: chaoyong.he at corigine.com
Cc: stable at dpdk.org

Signed-off-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
index 24e7047407..df84eedae4 100644
--- a/drivers/net/nfp/flower/nfp_flower_flow.c
+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
@@ -4757,7 +4757,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
 		total_actions++;
 	}
 
-	if (total_actions == 0 || param.position == param.action_data) {
+	if (nfp_flow->install_flag && total_actions == 0) {
 		PMD_DRV_LOG(ERR, "The action list is empty");
 		return -ENOTSUP;
 	}
-- 
2.39.1



More information about the dev mailing list