[08/13] net/nfp: improve modularazation of flower ctrl module

Message ID 20230920113454.739356-9-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series improve the modularization of NFP PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chaoyong He Sept. 20, 2023, 11:34 a.m. UTC
  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@corigine.com>
---
 drivers/net/nfp/flower/nfp_flower_ctrl.c | 13 +++++--------
 drivers/net/nfp/flower/nfp_flower_ctrl.h |  2 ++
 2 files changed, 7 insertions(+), 8 deletions(-)
  

Patch

diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c
index 4cb2c2f99e..bdb042142a 100644
--- a/drivers/net/nfp/flower/nfp_flower_ctrl.c
+++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c
@@ -3,20 +3,17 @@ 
  * All rights reserved.
  */
 
-#include <rte_common.h>
+#include "nfp_flower_ctrl.h"
+
 #include <rte_service.h>
-#include <ethdev_pci.h>
 
-#include "../nfp_common.h"
-#include "../nfp_logs.h"
-#include "../nfp_ctrl.h"
-#include "../nfp_rxtx.h"
 #include "../nfd3/nfp_nfd3.h"
 #include "../nfdk/nfp_nfdk.h"
-#include "nfp_flower.h"
-#include "nfp_flower_ctrl.h"
+#include "../nfp_flow.h"
+#include "../nfp_logs.h"
 #include "nfp_flower_cmsg.h"
 #include "nfp_flower_representor.h"
+#include "nfp_mtr.h"
 
 #define MAX_PKT_BURST 32
 
diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.h b/drivers/net/nfp/flower/nfp_flower_ctrl.h
index b7e836cf7e..f73a024266 100644
--- a/drivers/net/nfp/flower/nfp_flower_ctrl.h
+++ b/drivers/net/nfp/flower/nfp_flower_ctrl.h
@@ -6,6 +6,8 @@ 
 #ifndef _NFP_FLOWER_CTRL_H_
 #define _NFP_FLOWER_CTRL_H_
 
+#include "nfp_flower.h"
+
 void nfp_flower_ctrl_vnic_poll(struct nfp_app_fw_flower *app_fw_flower);
 uint16_t nfp_flower_ctrl_vnic_xmit(struct nfp_app_fw_flower *app_fw_flower,
 		struct rte_mbuf *mbuf);