From: Chengwen Feng <fengchengwen@huawei.com>
Header files should be self contained and should not be cyclically
dependent. This patch fixed it.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
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(-)
@@ -7,6 +7,9 @@
#include <stdint.h>
+#include <rte_byteorder.h>
+#include <rte_spinlock.h>
+
#define HNS3_CMDQ_TX_TIMEOUT 30000
#define HNS3_CMDQ_CLEAR_WAIT_TIME 200
#define HNS3_CMDQ_RX_INVLD_B 0
@@ -7,10 +7,10 @@
#include <ethdev_pci.h>
#include <rte_pci.h>
-#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,
@@ -7,7 +7,11 @@
#include <stdint.h>
+#include <ethdev_driver.h>
+#include <rte_ethdev.h>
+
#include "hns3_cmd.h"
+#include "hns3_ethdev.h"
#define HNS3_ETHER_MAX_RATE 100000
@@ -6,7 +6,6 @@
#include <bus_pci_driver.h>
#include <ethdev_pci.h>
-#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
@@ -5,6 +5,10 @@
#ifndef _HNS3_FDIR_H_
#define _HNS3_FDIR_H_
+#include <stdint.h>
+
+#include <rte_flow.h>
+
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);
@@ -6,6 +6,9 @@
#define _HNS3_FLOW_H_
#include <rte_flow.h>
+#include <ethdev_driver.h>
+
+#include "hns3_rss.h"
struct hns3_flow_counter {
LIST_ENTRY(hns3_flow_counter) next; /* Pointer to the next counter. */
@@ -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
@@ -5,6 +5,10 @@
#ifndef _HNS3_MBX_H_
#define _HNS3_MBX_H_
+#include <stdint.h>
+
+#include <rte_spinlock.h>
+
enum HNS3_MBX_OPCODE {
HNS3_MBX_RESET = 0x01, /* (VF -> PF) assert reset */
HNS3_MBX_ASSERTING_RESET, /* (PF -> VF) PF is asserting reset */
@@ -5,6 +5,8 @@
#ifndef _HNS3_MP_H_
#define _HNS3_MP_H_
+#include <ethdev_driver.h>
+
/* Local data for primary or secondary process. */
struct hns3_process_local_data {
bool init_done; /* Process action register completed flag. */
@@ -5,6 +5,9 @@
#ifndef _HNS3_REGS_H_
#define _HNS3_REGS_H_
+#include <ethdev_driver.h>
+#include <rte_dev_info.h>
+
/* bar registers for cmdq */
#define HNS3_CMDQ_TX_ADDR_L_REG 0x27000
#define HNS3_CMDQ_TX_ADDR_H_REG 0x27004
@@ -4,6 +4,7 @@
#ifndef _HNS3_RSS_H_
#define _HNS3_RSS_H_
+
#include <rte_ethdev.h>
#include <rte_flow.h>
@@ -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);
@@ -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
@@ -6,7 +6,16 @@
#define _HNS3_RXTX_H_
#include <stdint.h>
+
+#include <ethdev_driver.h>
#include <rte_mbuf_core.h>
+#include <rte_ethdev.h>
+#include <rte_ethdev_core.h>
+#include <rte_io.h>
+#include <rte_mempool.h>
+#include <rte_memzone.h>
+
+#include "hns3_ethdev.h"
#define HNS3_MIN_RING_DESC 64
#define HNS3_MAX_RING_DESC 32768
@@ -5,6 +5,9 @@
#ifndef _HNS3_STATS_H_
#define _HNS3_STATS_H_
+#include <ethdev_driver.h>
+#include <rte_ethdev.h>
+
/* 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,
@@ -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);