[PATCH 6/6] net/nfp: add CPP service abnormal exit logic

Chaoyong He chaoyong.he at corigine.com
Wed Jun 19 05:06:55 CEST 2024


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

As we already use the device argument to control the switch of
CPP service, it is time we can add the abnormal exit logic now.

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

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 696a301650..181798e8e3 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -2002,8 +2002,10 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	/* Register the CPP bridge service here for primary use */
 	if (pf_dev->devargs.cpp_service_enable) {
 		ret = nfp_enable_cpp_service(pf_dev);
-		if (ret != 0)
-			PMD_INIT_LOG(INFO, "Enable cpp service failed.");
+		if (ret != 0) {
+			PMD_INIT_LOG(ERR, "Enable CPP service failed.");
+			goto hwqueues_cleanup;
+		}
 	}
 
 	return 0;
-- 
2.39.1



More information about the dev mailing list