From: Long Wu <long...@corigine.com>

Stop cpp service if all representors are closed and cpp service is running.

Fixes: bab0e6f48b6d ("net/nfp: fix infinite loop")
Cc: chaoyong...@corigine.com
Cc: sta...@dpdk.org

Signed-off-by: Long Wu <long...@corigine.com>
Reviewed-by: Chaoyong He <chaoyong...@corigine.com>
Reviewed-by: Peng Zhang <peng.zh...@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_representor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c 
b/drivers/net/nfp/flower/nfp_flower_representor.c
index bf67dc3ba2..2e8eb13e4e 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -400,6 +400,9 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
        /* Stop flower service first */
        nfp_flower_service_stop(app_fw_flower);
 
+       /* Disable cpp service if need */
+       nfp_service_disable(&pf_dev->cpp_service_info);
+
        /* Now it is safe to free all PF resources */
        nfp_uninit_app_fw_flower(pf_dev);
        nfp_pf_uninit(pf_dev);
-- 
2.39.1

Reply via email to