From: Long Wu <long...@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...@corigine.com> Reviewed-by: Peng Zhang <peng.zh...@corigine.com> Reviewed-by: Chaoyong He <chaoyong...@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