From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C683DA034C for ; Fri, 30 Sep 2022 09:24:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37D6942BAE; Fri, 30 Sep 2022 09:24:18 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 3F0AE42B8F; Fri, 30 Sep 2022 09:24:15 +0200 (CEST) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mf1nS3xvQzHtjY; Fri, 30 Sep 2022 15:19:24 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 15:24:13 +0800 From: Dongdong Liu To: , , , CC: , , , , , Subject: [PATCH 10/19] net/hns3: fix header file self contained Date: Fri, 30 Sep 2022 15:22:11 +0800 Message-ID: <20220930072220.20753-11-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20220930072220.20753-1-liudongdong3@huawei.com> References: <20220930072220.20753-1-liudongdong3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Chengwen Feng Header files should be self contained and should not be cyclically dependent. This patch fixed it. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_cmd.h | 3 +++ drivers/net/hns3/hns3_common.c | 2 +- drivers/net/hns3/hns3_dcb.h | 4 ++++ drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_fdir.h | 5 +++++ drivers/net/hns3/hns3_flow.h | 3 +++ drivers/net/hns3/hns3_intr.c | 2 +- drivers/net/hns3/hns3_mbx.h | 4 ++++ drivers/net/hns3/hns3_mp.h | 2 ++ drivers/net/hns3/hns3_regs.h | 3 +++ drivers/net/hns3/hns3_rss.h | 2 ++ drivers/net/hns3/hns3_rxtx.c | 2 +- drivers/net/hns3/hns3_rxtx.h | 9 +++++++++ drivers/net/hns3/hns3_stats.h | 5 +++++ drivers/net/hns3/hns3_tm.h | 2 ++ 15 files changed, 46 insertions(+), 4 deletions(-) diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h index 82c999061d..bee96c1e46 100644 --- a/drivers/net/hns3/hns3_cmd.h +++ b/drivers/net/hns3/hns3_cmd.h @@ -7,6 +7,9 @@ #include +#include +#include + #define HNS3_CMDQ_TX_TIMEOUT 30000 #define HNS3_CMDQ_CLEAR_WAIT_TIME 200 #define HNS3_CMDQ_RX_INVLD_B 0 diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c index e732f68238..14291193cb 100644 --- a/drivers/net/hns3/hns3_common.c +++ b/drivers/net/hns3/hns3_common.c @@ -7,10 +7,10 @@ #include #include -#include "hns3_common.h" #include "hns3_logs.h" #include "hns3_regs.h" #include "hns3_rxtx.h" +#include "hns3_common.h" int hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version, diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h index e06ec177c8..9d9e7684c1 100644 --- a/drivers/net/hns3/hns3_dcb.h +++ b/drivers/net/hns3/hns3_dcb.h @@ -7,7 +7,11 @@ #include +#include +#include + #include "hns3_cmd.h" +#include "hns3_ethdev.h" #define HNS3_ETHER_MAX_RATE 100000 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index a1348f93a7..60e933998a 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -6,7 +6,6 @@ #include #include -#include "hns3_ethdev.h" #include "hns3_common.h" #include "hns3_dump.h" #include "hns3_logs.h" @@ -16,6 +15,7 @@ #include "hns3_dcb.h" #include "hns3_mp.h" #include "hns3_flow.h" +#include "hns3_ethdev.h" #define HNS3_SERVICE_INTERVAL 1000000 /* us */ #define HNS3_SERVICE_QUICK_INTERVAL 10 diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h index d81f04a3f3..1a14f1eceb 100644 --- a/drivers/net/hns3/hns3_fdir.h +++ b/drivers/net/hns3/hns3_fdir.h @@ -5,6 +5,10 @@ #ifndef _HNS3_FDIR_H_ #define _HNS3_FDIR_H_ +#include + +#include + struct hns3_fd_key_cfg { uint8_t key_sel; uint8_t inner_sipv6_word_en; @@ -177,6 +181,7 @@ struct hns3_fdir_info { }; struct hns3_adapter; +struct hns3_hw; int hns3_init_fd_config(struct hns3_adapter *hns); int hns3_fdir_filter_init(struct hns3_adapter *hns); diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h index 854fbb7ff0..ec94510152 100644 --- a/drivers/net/hns3/hns3_flow.h +++ b/drivers/net/hns3/hns3_flow.h @@ -6,6 +6,9 @@ #define _HNS3_FLOW_H_ #include +#include + +#include "hns3_rss.h" struct hns3_flow_counter { LIST_ENTRY(hns3_flow_counter) next; /* Pointer to the next counter. */ diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 4bdcd6070b..57679254ee 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -10,9 +10,9 @@ #include "hns3_common.h" #include "hns3_logs.h" -#include "hns3_intr.h" #include "hns3_regs.h" #include "hns3_rxtx.h" +#include "hns3_intr.h" #define SWITCH_CONTEXT_US 10 diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h index 0172a2e288..97f704426c 100644 --- a/drivers/net/hns3/hns3_mbx.h +++ b/drivers/net/hns3/hns3_mbx.h @@ -5,6 +5,10 @@ #ifndef _HNS3_MBX_H_ #define _HNS3_MBX_H_ +#include + +#include + enum HNS3_MBX_OPCODE { HNS3_MBX_RESET = 0x01, /* (VF -> PF) assert reset */ HNS3_MBX_ASSERTING_RESET, /* (PF -> VF) PF is asserting reset */ diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h index a74221d086..230230bbfe 100644 --- a/drivers/net/hns3/hns3_mp.h +++ b/drivers/net/hns3/hns3_mp.h @@ -5,6 +5,8 @@ #ifndef _HNS3_MP_H_ #define _HNS3_MP_H_ +#include + /* Local data for primary or secondary process. */ struct hns3_process_local_data { bool init_done; /* Process action register completed flag. */ diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h index 5812eb39db..2636429844 100644 --- a/drivers/net/hns3/hns3_regs.h +++ b/drivers/net/hns3/hns3_regs.h @@ -5,6 +5,9 @@ #ifndef _HNS3_REGS_H_ #define _HNS3_REGS_H_ +#include +#include + /* bar registers for cmdq */ #define HNS3_CMDQ_TX_ADDR_L_REG 0x27000 #define HNS3_CMDQ_TX_ADDR_H_REG 0x27004 diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 1589c67c59..6cae5f8634 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -4,6 +4,7 @@ #ifndef _HNS3_RSS_H_ #define _HNS3_RSS_H_ + #include #include @@ -91,6 +92,7 @@ static inline uint32_t roundup_pow_of_two(uint32_t x) extern const uint8_t hns3_hash_key[HNS3_RSS_KEY_SIZE]; struct hns3_adapter; +struct hns3_hw; int hns3_dev_rss_hash_update(struct rte_eth_dev *dev, struct rte_eth_rss_conf *rss_conf); diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 0a342ed9a2..f1163ce8a9 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -17,10 +17,10 @@ #endif #include "hns3_common.h" -#include "hns3_rxtx.h" #include "hns3_regs.h" #include "hns3_logs.h" #include "hns3_mp.h" +#include "hns3_rxtx.h" #define HNS3_CFG_DESC_NUM(num) ((num) / 8 - 1) #define HNS3_RX_RING_PREFETCTH_MASK 3 diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index 455f8b9419..f2d73043b7 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -6,7 +6,16 @@ #define _HNS3_RXTX_H_ #include + +#include #include +#include +#include +#include +#include +#include + +#include "hns3_ethdev.h" #define HNS3_MIN_RING_DESC 64 #define HNS3_MAX_RING_DESC 32768 diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h index 9d84072205..9a360f8870 100644 --- a/drivers/net/hns3/hns3_stats.h +++ b/drivers/net/hns3/hns3_stats.h @@ -5,6 +5,9 @@ #ifndef _HNS3_STATS_H_ #define _HNS3_STATS_H_ +#include +#include + /* TQP stats */ struct hns3_tqp_stats { uint64_t rcb_tx_ring_pktnum_rcd; /* Total num of transmitted packets */ @@ -145,6 +148,8 @@ struct hns3_reset_stats; #define HNS3_IMISSED_STATS_FIELD_OFFSET(f) \ (offsetof(struct hns3_rx_missed_stats, f)) +struct hns3_hw; + int hns3_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *rte_stats); int hns3_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, diff --git a/drivers/net/hns3/hns3_tm.h b/drivers/net/hns3/hns3_tm.h index 83e9cc8ba9..47345eeed1 100644 --- a/drivers/net/hns3/hns3_tm.h +++ b/drivers/net/hns3/hns3_tm.h @@ -105,6 +105,8 @@ hns3_tm_calc_node_tc_no(struct hns3_tm_conf *conf, uint32_t node_id) return 0; } +struct hns3_hw; + void hns3_tm_conf_init(struct rte_eth_dev *dev); void hns3_tm_conf_uninit(struct rte_eth_dev *dev); int hns3_tm_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg); -- 2.22.0