[PATCH 06/13] net/nfp: improve modularazation of flower module
Chaoyong He
chaoyong.he at corigine.com
Wed Sep 20 13:34:47 CEST 2023
Make the header file self-containing by adding the correct include
statement.
Also remove the unneeded header file include statement of source file.
Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
---
drivers/net/nfp/flower/nfp_flower.c | 24 ++++++++++--------------
drivers/net/nfp/flower/nfp_flower.h | 2 ++
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index bbcfa6e66a..bbcbb0060b 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -3,27 +3,23 @@
* All rights reserved.
*/
-#include <rte_common.h>
-#include <rte_service_component.h>
-#include <rte_malloc.h>
+#include "nfp_flower.h"
+
#include <rte_alarm.h>
-#include <ethdev_pci.h>
-#include <ethdev_driver.h>
+#include <rte_malloc.h>
+#include <rte_service_component.h>
-#include "../nfp_common.h"
-#include "../nfp_logs.h"
-#include "../nfp_ctrl.h"
-#include "../nfp_cpp_bridge.h"
-#include "../nfp_rxtx.h"
#include "../nfd3/nfp_nfd3.h"
#include "../nfdk/nfp_nfdk.h"
-#include "../nfpcore/nfp_mip.h"
-#include "../nfpcore/nfp_rtsym.h"
#include "../nfpcore/nfp_nsp.h"
-#include "nfp_flower.h"
+#include "../nfpcore/nfp_rtsym.h"
+#include "../nfp_cpp_bridge.h"
+#include "../nfp_flow.h"
+#include "../nfp_logs.h"
+#include "../nfp_mtr.h"
+#include "nfp_flower_cmsg.h"
#include "nfp_flower_ctrl.h"
#include "nfp_flower_representor.h"
-#include "nfp_flower_cmsg.h"
#define CTRL_VNIC_NB_DESC 512
diff --git a/drivers/net/nfp/flower/nfp_flower.h b/drivers/net/nfp/flower/nfp_flower.h
index e8df8b1769..244b6daa37 100644
--- a/drivers/net/nfp/flower/nfp_flower.h
+++ b/drivers/net/nfp/flower/nfp_flower.h
@@ -34,7 +34,9 @@
#define MAX_FLOWER_PHYPORTS 8
#define MAX_FLOWER_VFS 64
+/* Forward declaration */
struct nfp_app_fw_flower;
+struct nfp_flower_representor;
/* The function pointers for different NFD version */
struct nfp_flower_nfd_func {
--
2.39.1
More information about the dev
mailing list