lib: remove C++ include guard from private headers
authorThomas Monjalon <thomas@monjalon.net>
Wed, 15 Sep 2021 16:46:35 +0000 (18:46 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 22 Sep 2021 20:00:17 +0000 (22:00 +0200)
The private headers are compiled internally with a C compiler.
Thus extern "C" declaration is useless in such files.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
25 files changed:
lib/acl/acl_vect.h
lib/acl/tb_mem.h
lib/bpf/bpf_def.h
lib/bpf/bpf_impl.h
lib/cryptodev/cryptodev_pmd.h
lib/distributor/distributor_private.h
lib/eal/common/malloc_heap.h
lib/ethdev/ethdev_driver.h
lib/ethdev/ethdev_private.h
lib/eventdev/eventdev_pmd.h
lib/eventdev/eventdev_pmd_pci.h
lib/eventdev/eventdev_pmd_vdev.h
lib/fib/dir24_8.h
lib/fib/trie.h
lib/node/ethdev_rx_priv.h
lib/node/ethdev_tx_priv.h
lib/node/ip4_rewrite_priv.h
lib/node/pkt_cls_priv.h
lib/power/guest_channel.h
lib/power/power_acpi_cpufreq.h
lib/power/power_cppc_cpufreq.h
lib/power/power_kvm_vm.h
lib/power/power_pstate_cpufreq.h
lib/rcu/rcu_qsbr_pvt.h
lib/stack/stack_pvt.h

index 951e582..e4b4666 100644 (file)
  * RTE ACL SSE/AVX related header.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 
 /*
  * Takes 2 SIMD registers containing N transitions each (tr0, tr1).
@@ -80,8 +76,4 @@ extern "C" {
 } while (0)
 
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RTE_ACL_VECT_H_ */
index 50a803c..2093744 100644 (file)
  * destructed (finish of build phase).
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <rte_acl_osdep.h>
 #include <setjmp.h>
 
@@ -40,8 +36,4 @@ struct tb_mem_pool {
 void *tb_alloc(struct tb_mem_pool *pool, size_t size);
 void tb_free_pool(struct tb_mem_pool *pool);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _TB_MEM_H_ */
index d399929..fa91253 100644 (file)
 #include <stdint.h>
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * The instruction encodings.
  */
@@ -144,8 +140,4 @@ struct ebpf_insn {
  */
 #define        EBPF_FUNC_MAX_ARGS      (EBPF_REG_6 - EBPF_REG_1)
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* RTE_BPF_DEF_H_ */
index 03ba0ae..26d165a 100644 (file)
@@ -8,10 +8,6 @@
 #include <rte_bpf.h>
 #include <sys/mman.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define MAX_BPF_STACK_SIZE     0x200
 
 struct rte_bpf {
@@ -47,8 +43,4 @@ bpf_size(uint32_t bpf_op_sz)
        return 0;
 }
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _BPF_H_ */
index ec7bb82..ae3aac5 100644 (file)
  * them directly.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <string.h>
 
 #include <rte_config.h>
@@ -561,8 +557,4 @@ set_asym_session_private_data(struct rte_cryptodev_asym_session *sess,
        sess->sess_private_data[driver_id] = private_data;
 }
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _CRYPTODEV_PMD_H_ */
index 689fe3e..7101f63 100644 (file)
  * one-at-a-time to workers, with dynamic load balancing.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define NO_FLAGS 0
 #define RTE_DISTRIB_PREFIX "DT_"
 
@@ -170,8 +166,4 @@ find_match_vec(struct rte_distributor *d,
                        uint16_t *data_ptr,
                        uint16_t *output_ptr);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _DIST_PRIV_H_ */
index 772736b..3a6ec6e 100644 (file)
@@ -33,10 +33,6 @@ struct malloc_heap {
        char name[RTE_HEAP_NAME_MAX_LEN];
 } __rte_cache_aligned;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static inline unsigned
 malloc_get_numa_socket(void)
 {
@@ -100,8 +96,4 @@ malloc_socket_to_heap_id(unsigned int socket_id);
 int
 rte_eal_malloc_heap_init(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* MALLOC_HEAP_H_ */
index 40e474a..cc2c752 100644 (file)
 
 #include <rte_ethdev.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**< @internal Declaration of the hairpin peer queue information structure. */
 struct rte_hairpin_peer_info;
 
@@ -1513,8 +1509,4 @@ struct rte_eth_tunnel_filter_conf {
        uint16_t queue_id;      /**< Queue assigned to if match. */
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RTE_ETHDEV_DRIVER_H_ */
index 9bb0879..3724429 100644 (file)
@@ -9,10 +9,6 @@
 
 #include "rte_ethdev.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * Convert rte_eth_dev pointer to port id.
  * NULL will be translated to RTE_MAX_ETHPORTS.
@@ -30,8 +26,4 @@ eth_find_device(const struct rte_eth_dev *_start, rte_eth_cmp_t cmp,
 /* Parse devargs value for representor parameter. */
 int rte_eth_devargs_parse_representor_ports(char *str, void *data);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _ETH_PRIVATE_H_ */
index 0f724ac..94d99f4 100644 (file)
  * them directly.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <string.h>
 
 #include <rte_common.h>
@@ -1192,8 +1188,4 @@ rte_event_pmd_allocate(const char *name, int socket_id);
 int
 rte_event_pmd_release(struct rte_eventdev *eventdev);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RTE_EVENTDEV_PMD_H_ */
index d14ea63..1545b24 100644 (file)
  * them directly.
  */
 
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <string.h>
 
 #include <rte_config.h>
@@ -151,8 +146,4 @@ rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev,
        return 0;
 }
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RTE_EVENTDEV_PMD_PCI_H_ */
index bc0cf44..2d33924 100644 (file)
  * them directly.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <string.h>
 
 #include <rte_config.h>
@@ -101,8 +97,4 @@ rte_event_pmd_vdev_uninit(const char *name)
        return 0;
 }
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RTE_EVENTDEV_PMD_VDEV_H_ */
index bac65ee..b0d1a40 100644 (file)
  * DIR24_8 algorithm
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define DIR24_8_TBL24_NUM_ENT          (1 << 24)
 #define DIR24_8_TBL8_GRP_NUM_ENT       256U
 #define DIR24_8_EXT_ENT                        1
@@ -252,8 +248,4 @@ int
 dir24_8_modify(struct rte_fib *fib, uint32_t ip, uint8_t depth,
        uint64_t next_hop, int op);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _DIR24_8_H_ */
index a4f429c..9fd15ae 100644 (file)
 #include <rte_prefetch.h>
 #include <rte_branch_prediction.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* @internal Total number of tbl24 entries. */
 #define TRIE_TBL24_NUM_ENT     (1 << 24)
 /* Maximum depth value possible for IPv6 LPM. */
@@ -145,9 +141,4 @@ int
 trie_modify(struct rte_fib6 *fib, const uint8_t ip[RTE_FIB6_IPV6_ADDR_SIZE],
        uint8_t depth, uint64_t next_hop, int op);
 
-
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _TRIE_H_ */
index efcd66d..21dcba5 100644 (file)
@@ -4,10 +4,6 @@
 #ifndef __INCLUDE_ETHDEV_RX_PRIV_H__
 #define __INCLUDE_ETHDEV_RX_PRIV_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <rte_common.h>
 
 struct ethdev_rx_node_elem;
@@ -76,8 +72,4 @@ struct ethdev_rx_node_main *ethdev_rx_get_node_data_get(void);
  */
 struct rte_node_register *ethdev_rx_node_get(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* __INCLUDE_ETHDEV_RX_PRIV_H__ */
index 586bff4..e3a6fdb 100644 (file)
@@ -4,10 +4,6 @@
 #ifndef __INCLUDE_ETHDEV_TX_PRIV_H__
 #define __INCLUDE_ETHDEV_TX_PRIV_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct ethdev_tx_node_ctx;
 typedef struct ethdev_tx_node_ctx ethdev_tx_node_ctx_t;
 
@@ -55,8 +51,4 @@ struct ethdev_tx_node_main *ethdev_tx_node_data_get(void);
  */
 struct rte_node_register *ethdev_tx_node_get(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* __INCLUDE_ETHDEV_TX_PRIV_H__ */
index 80f0abd..a1fb866 100644 (file)
@@ -4,10 +4,6 @@
 #ifndef __INCLUDE_IP4_REWRITE_PRIV_H__
 #define __INCLUDE_IP4_REWRITE_PRIV_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <rte_common.h>
 
 #define RTE_GRAPH_IP4_REWRITE_MAX_NH 64
@@ -70,8 +66,4 @@ struct rte_node_register *ip4_rewrite_node_get(void);
  */
 int ip4_rewrite_set_next(uint16_t port_id, uint16_t next_index);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* __INCLUDE_IP4_REWRITE_PRIV_H__ */
index 3f2bb04..6f5374f 100644 (file)
@@ -4,10 +4,6 @@
 #ifndef __INCLUDE_PKT_CLS_PRIV_H__
 #define __INCLUDE_PKT_CLS_PRIV_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <rte_common.h>
 
 struct pkt_cls_node_ctx {
@@ -20,8 +16,4 @@ enum pkt_cls_next_nodes {
        PKT_CLS_NEXT_MAX,
 };
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* __INCLUDE_PKT_CLS_PRIV_H__ */
index 43d532a..bdda136 100644 (file)
@@ -4,10 +4,6 @@
 #ifndef _GUEST_CHANNEL_H
 #define _GUEST_CHANNEL_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Check if any Virtio-Serial VM end-points exist in path.
  *
@@ -86,9 +82,4 @@ int power_guest_channel_read_msg(void *pkt,
                size_t pkt_len,
                unsigned int lcore_id);
 
-
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 038857b..41675b9 100644 (file)
 #include <rte_string_fns.h>
 #include "rte_power.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Check if ACPI power management is supported.
  *
@@ -222,8 +218,4 @@ int power_acpi_disable_turbo(unsigned int lcore_id);
 int power_acpi_get_capabilities(unsigned int lcore_id,
                struct rte_power_core_capabilities *caps);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 57c0ee8..4e73c91 100644 (file)
 #include <rte_string_fns.h>
 #include "rte_power.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Check if CPPC power management is supported.
  *
@@ -223,8 +219,4 @@ int power_cppc_disable_turbo(unsigned int lcore_id);
 int power_cppc_get_capabilities(unsigned int lcore_id,
                struct rte_power_core_capabilities *caps);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _POWER_CPPC_CPUFREQ_H */
index 73b4c82..9a309a3 100644 (file)
 #include <rte_string_fns.h>
 #include "rte_power.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Check if KVM power management is supported.
  *
@@ -204,7 +200,4 @@ int power_kvm_vm_disable_turbo(unsigned int lcore_id);
 int power_kvm_vm_get_capabilities(unsigned int lcore_id,
                struct rte_power_core_capabilities *caps);
 
-#ifdef __cplusplus
-}
-#endif
 #endif
index 0be0bd6..3260b32 100644 (file)
 #include <rte_string_fns.h>
 #include "rte_power.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * Check if pstate power management is supported.
  *
@@ -221,8 +217,5 @@ int power_pstate_disable_turbo(unsigned int lcore_id);
  */
 int power_pstate_get_capabilities(unsigned int lcore_id,
                struct rte_power_core_capabilities *caps);
-#ifdef __cplusplus
-}
-#endif
 
 #endif
index 196b9ab..5fd7ca2 100644 (file)
  * by the user of this library.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <rte_ring.h>
 #include <rte_ring_elem.h>
 
@@ -59,8 +55,4 @@ typedef struct {
        uint8_t elem[0]; /**< Pointer to user element */
 } __attribute__((__may_alias__)) __rte_rcu_qsbr_dq_elem_t;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RTE_RCU_QSBR_PVT_H_ */
index ecf4081..c7eab40 100644 (file)
@@ -5,10 +5,6 @@
 #ifndef _STACK_PVT_H_
 #define _STACK_PVT_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <rte_log.h>
 
 extern int stack_logtype;
@@ -26,9 +22,4 @@ extern int stack_logtype;
 #define STACK_LOG_INFO(fmt, args...) \
        STACK_LOG(INFO, fmt, ## args)
 
-
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _STACK_PVT_H_ */