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>
This commit is contained in:
parent
f5a46128fb
commit
2ad146efb1
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -2,12 +2,12 @@
|
||||
* Copyright(C) 2022 HiSilicon Limited
|
||||
*/
|
||||
|
||||
#ifndef _HNS3_DUMP_H_
|
||||
#define _HNS3_DUMP_H_
|
||||
#ifndef HNS3_DUMP_H
|
||||
#define HNS3_DUMP_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ethdev_driver.h>
|
||||
|
||||
int hns3_eth_dev_priv_dump(struct rte_eth_dev *dev, FILE *file);
|
||||
#endif /* _HNS3_DUMP_H_ */
|
||||
#endif /* HNS3_DUMP_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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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>
|
||||
|
||||
@ -777,4 +777,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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user