Sync some patches for hns3 PMD, telemetry and testpmd. And main modifications are as follows: - backport some bugfixes for hns3 - revert Tx performance optimization for hns3 - add Rx/Tx descriptor dump feature for hns3 - refactor some RSS commands for testpmd - add ethdev telemetry private dump - add dmadev telemetry - sync telemetry lib Signed-off-by: Huisong Li <lihuisong@huawei.com> (cherry picked from commit 4f06d27eff9aa99c2e2073ac74328893990ed8ed)
411 lines
12 KiB
Diff
411 lines
12 KiB
Diff
From 73da6c3b6da30cc03c4a36f0d71d4ffd220f4026 Mon Sep 17 00:00:00 2001
|
|
From: Chengwen Feng <fengchengwen@huawei.com>
|
|
Date: Fri, 21 Oct 2022 15:36:32 +0800
|
|
Subject: [PATCH 156/189] net/hns3: rename header guards
|
|
|
|
Currently, the hns3 driver uses _HNS3_XXX conditional compilation
|
|
macros to prevent duplicate header files. But in the C11 standard, all
|
|
identifiers starting with an underscore plus an uppercase letter are
|
|
always reserved. So this patch fixes it.
|
|
|
|
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
|
|
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
|
---
|
|
drivers/net/hns3/hns3_cmd.h | 6 +++---
|
|
drivers/net/hns3/hns3_common.h | 6 +++---
|
|
drivers/net/hns3/hns3_dcb.h | 6 +++---
|
|
drivers/net/hns3/hns3_dump.h | 6 +++---
|
|
drivers/net/hns3/hns3_ethdev.h | 6 +++---
|
|
drivers/net/hns3/hns3_fdir.h | 6 +++---
|
|
drivers/net/hns3/hns3_flow.h | 6 +++---
|
|
drivers/net/hns3/hns3_intr.h | 6 +++---
|
|
drivers/net/hns3/hns3_logs.h | 6 +++---
|
|
drivers/net/hns3/hns3_mbx.h | 6 +++---
|
|
drivers/net/hns3/hns3_mp.h | 6 +++---
|
|
drivers/net/hns3/hns3_regs.h | 6 +++---
|
|
drivers/net/hns3/hns3_rss.h | 6 +++---
|
|
drivers/net/hns3/hns3_rxtx.h | 6 +++---
|
|
drivers/net/hns3/hns3_rxtx_vec.h | 6 +++---
|
|
drivers/net/hns3/hns3_rxtx_vec_neon.h | 6 +++---
|
|
drivers/net/hns3/hns3_stats.h | 6 +++---
|
|
drivers/net/hns3/hns3_tm.h | 6 +++---
|
|
18 files changed, 54 insertions(+), 54 deletions(-)
|
|
|
|
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
|
|
index 902638ba99..8ac8b45819 100644
|
|
--- a/drivers/net/hns3/hns3_cmd.h
|
|
+++ b/drivers/net/hns3/hns3_cmd.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_CMD_H_
|
|
-#define _HNS3_CMD_H_
|
|
+#ifndef HNS3_CMD_H
|
|
+#define HNS3_CMD_H
|
|
|
|
#include <stdint.h>
|
|
|
|
@@ -1038,4 +1038,4 @@ int hns3_cmd_init(struct hns3_hw *hw);
|
|
void hns3_cmd_destroy_queue(struct hns3_hw *hw);
|
|
void hns3_cmd_uninit(struct hns3_hw *hw);
|
|
|
|
-#endif /* _HNS3_CMD_H_ */
|
|
+#endif /* HNS3_CMD_H */
|
|
diff --git a/drivers/net/hns3/hns3_common.h b/drivers/net/hns3/hns3_common.h
|
|
index 2994e4a269..5aa001f0cc 100644
|
|
--- a/drivers/net/hns3/hns3_common.h
|
|
+++ b/drivers/net/hns3/hns3_common.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(C) 2021 HiSilicon Limited
|
|
*/
|
|
|
|
-#ifndef _HNS3_COMMON_H_
|
|
-#define _HNS3_COMMON_H_
|
|
+#ifndef HNS3_COMMON_H
|
|
+#define HNS3_COMMON_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
@@ -61,4 +61,4 @@ int hns3_restore_rx_interrupt(struct hns3_hw *hw);
|
|
|
|
int hns3_get_pci_revision_id(struct hns3_hw *hw, uint8_t *revision_id);
|
|
|
|
-#endif /* _HNS3_COMMON_H_ */
|
|
+#endif /* HNS3_COMMON_H */
|
|
diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
|
|
index 9d9e7684c1..d5bb5edf4d 100644
|
|
--- a/drivers/net/hns3/hns3_dcb.h
|
|
+++ b/drivers/net/hns3/hns3_dcb.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_DCB_H_
|
|
-#define _HNS3_DCB_H_
|
|
+#ifndef HNS3_DCB_H
|
|
+#define HNS3_DCB_H
|
|
|
|
#include <stdint.h>
|
|
|
|
@@ -215,4 +215,4 @@ int hns3_update_queue_map_configure(struct hns3_adapter *hns);
|
|
int hns3_port_shaper_update(struct hns3_hw *hw, uint32_t speed);
|
|
uint8_t hns3_txq_mapped_tc_get(struct hns3_hw *hw, uint16_t txq_no);
|
|
|
|
-#endif /* _HNS3_DCB_H_ */
|
|
+#endif /* HNS3_DCB_H */
|
|
diff --git a/drivers/net/hns3/hns3_dump.h b/drivers/net/hns3/hns3_dump.h
|
|
index 8ba7ee866a..616cb70d6e 100644
|
|
--- a/drivers/net/hns3/hns3_dump.h
|
|
+++ b/drivers/net/hns3/hns3_dump.h
|
|
@@ -2,9 +2,9 @@
|
|
* Copyright(C) 2022 HiSilicon Limited
|
|
*/
|
|
|
|
-#ifndef _HNS3_DUMP_H_
|
|
-#define _HNS3_DUMP_H_
|
|
+#ifndef HNS3_DUMP_H
|
|
+#define HNS3_DUMP_H
|
|
|
|
int hns3_eth_dev_priv_dump(struct rte_eth_dev *dev, FILE *file);
|
|
|
|
-#endif /* _HNS3_DUMP_H_ */
|
|
+#endif /* HNS3_DUMP_H */
|
|
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
|
|
index aad779e949..40476bf882 100644
|
|
--- a/drivers/net/hns3/hns3_ethdev.h
|
|
+++ b/drivers/net/hns3/hns3_ethdev.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_ETHDEV_H_
|
|
-#define _HNS3_ETHDEV_H_
|
|
+#ifndef HNS3_ETHDEV_H
|
|
+#define HNS3_ETHDEV_H
|
|
|
|
#include <pthread.h>
|
|
#include <ethdev_driver.h>
|
|
@@ -1074,4 +1074,4 @@ is_reset_pending(struct hns3_adapter *hns)
|
|
return ret;
|
|
}
|
|
|
|
-#endif /* _HNS3_ETHDEV_H_ */
|
|
+#endif /* HNS3_ETHDEV_H */
|
|
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
|
|
index 7be1c0a248..de2422e12f 100644
|
|
--- a/drivers/net/hns3/hns3_fdir.h
|
|
+++ b/drivers/net/hns3/hns3_fdir.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_FDIR_H_
|
|
-#define _HNS3_FDIR_H_
|
|
+#ifndef HNS3_FDIR_H
|
|
+#define HNS3_FDIR_H
|
|
|
|
#include <stdint.h>
|
|
|
|
@@ -192,4 +192,4 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns);
|
|
int hns3_fd_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value);
|
|
int hns3_restore_all_fdir_filter(struct hns3_adapter *hns);
|
|
|
|
-#endif /* _HNS3_FDIR_H_ */
|
|
+#endif /* HNS3_FDIR_H */
|
|
diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h
|
|
index ec94510152..e4b2fdf2e6 100644
|
|
--- a/drivers/net/hns3/hns3_flow.h
|
|
+++ b/drivers/net/hns3/hns3_flow.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(C) 2021 HiSilicon Limited
|
|
*/
|
|
|
|
-#ifndef _HNS3_FLOW_H_
|
|
-#define _HNS3_FLOW_H_
|
|
+#ifndef HNS3_FLOW_H
|
|
+#define HNS3_FLOW_H
|
|
|
|
#include <rte_flow.h>
|
|
#include <ethdev_driver.h>
|
|
@@ -54,4 +54,4 @@ void hns3_flow_init(struct rte_eth_dev *dev);
|
|
void hns3_flow_uninit(struct rte_eth_dev *dev);
|
|
int hns3_restore_filter(struct hns3_adapter *hns);
|
|
|
|
-#endif /* _HNS3_FLOW_H_ */
|
|
+#endif /* HNS3_FLOW_H */
|
|
diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h
|
|
index 1490a5e387..aca1c0722c 100644
|
|
--- a/drivers/net/hns3/hns3_intr.h
|
|
+++ b/drivers/net/hns3/hns3_intr.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_INTR_H_
|
|
-#define _HNS3_INTR_H_
|
|
+#ifndef HNS3_INTR_H
|
|
+#define HNS3_INTR_H
|
|
|
|
#include <stdint.h>
|
|
|
|
@@ -190,4 +190,4 @@ void hns3_reset_abort(struct hns3_adapter *hns);
|
|
void hns3_start_report_lse(struct rte_eth_dev *dev);
|
|
void hns3_stop_report_lse(struct rte_eth_dev *dev);
|
|
|
|
-#endif /* _HNS3_INTR_H_ */
|
|
+#endif /* HNS3_INTR_H */
|
|
diff --git a/drivers/net/hns3/hns3_logs.h b/drivers/net/hns3/hns3_logs.h
|
|
index 072a53bd69..c880f752ab 100644
|
|
--- a/drivers/net/hns3/hns3_logs.h
|
|
+++ b/drivers/net/hns3/hns3_logs.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_LOGS_H_
|
|
-#define _HNS3_LOGS_H_
|
|
+#ifndef HNS3_LOGS_H
|
|
+#define HNS3_LOGS_H
|
|
|
|
extern int hns3_logtype_init;
|
|
#define PMD_INIT_LOG(level, fmt, args...) \
|
|
@@ -31,4 +31,4 @@ extern int hns3_logtype_driver;
|
|
#define hns3_dbg(hw, fmt, args...) \
|
|
PMD_DRV_LOG_RAW(hw, RTE_LOG_DEBUG, fmt "\n", ## args)
|
|
|
|
-#endif /* _HNS3_LOGS_H_ */
|
|
+#endif /* HNS3_LOGS_H */
|
|
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
|
|
index b6ccd9ff8c..c71f43238c 100644
|
|
--- a/drivers/net/hns3/hns3_mbx.h
|
|
+++ b/drivers/net/hns3/hns3_mbx.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_MBX_H_
|
|
-#define _HNS3_MBX_H_
|
|
+#ifndef HNS3_MBX_H
|
|
+#define HNS3_MBX_H
|
|
|
|
#include <stdint.h>
|
|
|
|
@@ -172,4 +172,4 @@ void hns3_dev_handle_mbx_msg(struct hns3_hw *hw);
|
|
int hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
|
|
const uint8_t *msg_data, uint8_t msg_len, bool need_resp,
|
|
uint8_t *resp_data, uint16_t resp_len);
|
|
-#endif /* _HNS3_MBX_H_ */
|
|
+#endif /* HNS3_MBX_H */
|
|
diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h
|
|
index 230230bbfe..5dc32a41d4 100644
|
|
--- a/drivers/net/hns3/hns3_mp.h
|
|
+++ b/drivers/net/hns3/hns3_mp.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_MP_H_
|
|
-#define _HNS3_MP_H_
|
|
+#ifndef HNS3_MP_H
|
|
+#define HNS3_MP_H
|
|
|
|
#include <ethdev_driver.h>
|
|
|
|
@@ -21,4 +21,4 @@ void hns3_mp_req_stop_tx(struct rte_eth_dev *dev);
|
|
int hns3_mp_init(struct rte_eth_dev *dev);
|
|
void hns3_mp_uninit(struct rte_eth_dev *dev);
|
|
|
|
-#endif /* _HNS3_MP_H_ */
|
|
+#endif /* HNS3_MP_H */
|
|
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
|
|
index 2636429844..459bbaf773 100644
|
|
--- a/drivers/net/hns3/hns3_regs.h
|
|
+++ b/drivers/net/hns3/hns3_regs.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_REGS_H_
|
|
-#define _HNS3_REGS_H_
|
|
+#ifndef HNS3_REGS_H
|
|
+#define HNS3_REGS_H
|
|
|
|
#include <ethdev_driver.h>
|
|
#include <rte_dev_info.h>
|
|
@@ -153,4 +153,4 @@
|
|
#define HNS3_RL_USEC_TO_REG(rl_usec) ((rl_usec) >> 2)
|
|
|
|
int hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs);
|
|
-#endif /* _HNS3_REGS_H_ */
|
|
+#endif /* HNS3_REGS_H */
|
|
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
|
|
index 0d24436cbe..5c288c8bb2 100644
|
|
--- a/drivers/net/hns3/hns3_rss.h
|
|
+++ b/drivers/net/hns3/hns3_rss.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_RSS_H_
|
|
-#define _HNS3_RSS_H_
|
|
+#ifndef HNS3_RSS_H
|
|
+#define HNS3_RSS_H
|
|
|
|
#include <rte_ethdev.h>
|
|
#include <rte_flow.h>
|
|
@@ -109,4 +109,4 @@ void hns3_rss_uninit(struct hns3_adapter *hns);
|
|
int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf);
|
|
int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key);
|
|
|
|
-#endif /* _HNS3_RSS_H_ */
|
|
+#endif /* HNS3_RSS_H */
|
|
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
|
|
index f619d6d466..ed40621b3a 100644
|
|
--- a/drivers/net/hns3/hns3_rxtx.h
|
|
+++ b/drivers/net/hns3/hns3_rxtx.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_RXTX_H_
|
|
-#define _HNS3_RXTX_H_
|
|
+#ifndef HNS3_RXTX_H
|
|
+#define HNS3_RXTX_H
|
|
|
|
#include <stdint.h>
|
|
|
|
@@ -780,4 +780,4 @@ void hns3_tx_push_init(struct rte_eth_dev *dev);
|
|
void hns3_stop_tx_datapath(struct rte_eth_dev *dev);
|
|
void hns3_start_tx_datapath(struct rte_eth_dev *dev);
|
|
|
|
-#endif /* _HNS3_RXTX_H_ */
|
|
+#endif /* HNS3_RXTX_H */
|
|
diff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h
|
|
index d13f18627d..2c8a91921e 100644
|
|
--- a/drivers/net/hns3/hns3_rxtx_vec.h
|
|
+++ b/drivers/net/hns3/hns3_rxtx_vec.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2020-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_RXTX_VEC_H_
|
|
-#define _HNS3_RXTX_VEC_H_
|
|
+#ifndef HNS3_RXTX_VEC_H
|
|
+#define HNS3_RXTX_VEC_H
|
|
|
|
#include "hns3_rxtx.h"
|
|
#include "hns3_ethdev.h"
|
|
@@ -94,4 +94,4 @@ hns3_rx_reassemble_pkts(struct rte_mbuf **rx_pkts,
|
|
|
|
return count;
|
|
}
|
|
-#endif /* _HNS3_RXTX_VEC_H_ */
|
|
+#endif /* HNS3_RXTX_VEC_H */
|
|
diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
|
|
index 0edd4756f1..55d9bf817d 100644
|
|
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
|
|
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2020-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_RXTX_VEC_NEON_H_
|
|
-#define _HNS3_RXTX_VEC_NEON_H_
|
|
+#ifndef HNS3_RXTX_VEC_NEON_H
|
|
+#define HNS3_RXTX_VEC_NEON_H
|
|
|
|
#include <arm_neon.h>
|
|
|
|
@@ -299,4 +299,4 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
|
|
|
|
return nb_rx;
|
|
}
|
|
-#endif /* _HNS3_RXTX_VEC_NEON_H_ */
|
|
+#endif /* HNS3_RXTX_VEC_NEON_H */
|
|
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
|
|
index 9a360f8870..74bc4173cc 100644
|
|
--- a/drivers/net/hns3/hns3_stats.h
|
|
+++ b/drivers/net/hns3/hns3_stats.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2018-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_STATS_H_
|
|
-#define _HNS3_STATS_H_
|
|
+#ifndef HNS3_STATS_H
|
|
+#define HNS3_STATS_H
|
|
|
|
#include <ethdev_driver.h>
|
|
#include <rte_ethdev.h>
|
|
@@ -172,4 +172,4 @@ void hns3_stats_uninit(struct hns3_hw *hw);
|
|
int hns3_query_mac_stats_reg_num(struct hns3_hw *hw);
|
|
void hns3_update_hw_stats(struct hns3_hw *hw);
|
|
|
|
-#endif /* _HNS3_STATS_H_ */
|
|
+#endif /* HNS3_STATS_H */
|
|
diff --git a/drivers/net/hns3/hns3_tm.h b/drivers/net/hns3/hns3_tm.h
|
|
index 47345eeed1..0cac1a5bb2 100644
|
|
--- a/drivers/net/hns3/hns3_tm.h
|
|
+++ b/drivers/net/hns3/hns3_tm.h
|
|
@@ -2,8 +2,8 @@
|
|
* Copyright(c) 2020-2021 HiSilicon Limited.
|
|
*/
|
|
|
|
-#ifndef _HNS3_TM_H_
|
|
-#define _HNS3_TM_H_
|
|
+#ifndef HNS3_TM_H
|
|
+#define HNS3_TM_H
|
|
|
|
#include <stdint.h>
|
|
#include <rte_tailq.h>
|
|
@@ -114,4 +114,4 @@ void hns3_tm_dev_start_proc(struct hns3_hw *hw);
|
|
void hns3_tm_dev_stop_proc(struct hns3_hw *hw);
|
|
int hns3_tm_conf_update(struct hns3_hw *hw);
|
|
|
|
-#endif /* _HNS3_TM_H */
|
|
+#endif /* HNS3_TM_H */
|
|
--
|
|
2.23.0
|
|
|