lib: add missing include dependencies
Exported header files for use by applications should be self sufficient and allow out of order inclusion. Moreover, they must include all the system headers they need for types and macros. This commit prevents the following errors: error: `RTE_MAX_LCORE' undeclared here (not in a function) error: `RTE_LPM_VALID_EXT_ENTRY_BITMASK' undeclared (first use in this function) error: #error "Unsupported cache line size" error: `asm' undeclared (first use in this function) error: implicit declaration of function `[...]' error: unknown type name `[...]' error: field `mac_addr' has incomplete type error: `CHAR_BIT' undeclared here (not in a function) error: `struct [...]' declared inside parameter list error: unknown type name `uint8_t' Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
parent
79d6f5fc58
commit
f04519d809
@ -34,6 +34,8 @@
|
||||
#ifndef __INCLUDE_RTE_CFGFILE_H__
|
||||
#define __INCLUDE_RTE_CFGFILE_H__
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -63,6 +63,7 @@
|
||||
|
||||
#include <termios.h>
|
||||
#include <cmdline_rdline.h>
|
||||
#include <cmdline_parse.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
@ -61,6 +61,7 @@
|
||||
#ifndef _PARSE_PORTLIST_H_
|
||||
#define _PARSE_PORTLIST_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cmdline_parse.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -61,6 +61,9 @@
|
||||
#ifndef _CMDLINE_SOCKET_H_
|
||||
#define _CMDLINE_SOCKET_H_
|
||||
|
||||
#include <cmdline_parse.h>
|
||||
#include <cmdline.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -41,6 +41,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
#include "generic/rte_byteorder.h"
|
||||
|
||||
/* fix missing __builtin_bswap16 for gcc older then 4.8 */
|
||||
|
@ -37,6 +37,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rte_common.h>
|
||||
#include "generic/rte_prefetch.h"
|
||||
|
||||
static inline void rte_prefetch0(const volatile void *p)
|
||||
|
@ -37,6 +37,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rte_common.h>
|
||||
#include "generic/rte_prefetch.h"
|
||||
|
||||
static inline void rte_prefetch0(const volatile void *p)
|
||||
|
@ -33,6 +33,7 @@
|
||||
#ifndef _RTE_VECT_ARM_H_
|
||||
#define _RTE_VECT_ARM_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "arm_neon.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -46,6 +46,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "generic/rte_atomic.h"
|
||||
|
||||
/**
|
||||
|
@ -42,6 +42,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "generic/rte_byteorder.h"
|
||||
|
||||
/*
|
||||
|
@ -37,6 +37,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rte_common.h>
|
||||
#include "generic/rte_prefetch.h"
|
||||
|
||||
static inline void rte_prefetch0(const volatile void *p)
|
||||
|
@ -38,6 +38,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
#include <emmintrin.h>
|
||||
#include "generic/rte_atomic.h"
|
||||
|
||||
|
@ -37,10 +37,16 @@
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _RTE_ATOMIC_X86_H_
|
||||
#error do not include this file directly, use <rte_atomic.h> instead
|
||||
#endif
|
||||
|
||||
#ifndef _RTE_ATOMIC_I686_H_
|
||||
#define _RTE_ATOMIC_I686_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
#include <rte_atomic.h>
|
||||
|
||||
/*------------------------- 64 bit atomic operations -------------------------*/
|
||||
|
||||
|
@ -37,9 +37,17 @@
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _RTE_ATOMIC_X86_H_
|
||||
#error do not include this file directly, use <rte_atomic.h> instead
|
||||
#endif
|
||||
|
||||
#ifndef _RTE_ATOMIC_X86_64_H_
|
||||
#define _RTE_ATOMIC_X86_64_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
#include <rte_atomic.h>
|
||||
|
||||
/*------------------------- 64 bit atomic operations -------------------------*/
|
||||
|
||||
#ifndef RTE_FORCE_INTRINSICS
|
||||
|
@ -38,6 +38,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
#include "generic/rte_byteorder.h"
|
||||
|
||||
#ifndef RTE_BYTE_ORDER
|
||||
|
@ -31,9 +31,16 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _RTE_BYTEORDER_X86_H_
|
||||
#error do not include this file directly, use <rte_byteorder.h> instead
|
||||
#endif
|
||||
|
||||
#ifndef _RTE_BYTEORDER_I686_H_
|
||||
#define _RTE_BYTEORDER_I686_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_byteorder.h>
|
||||
|
||||
/*
|
||||
* An architecture-optimized byte swap for a 64-bit value.
|
||||
*
|
||||
|
@ -31,9 +31,16 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _RTE_BYTEORDER_X86_H_
|
||||
#error do not include this file directly, use <rte_byteorder.h> instead
|
||||
#endif
|
||||
|
||||
#ifndef _RTE_BYTEORDER_X86_64_H_
|
||||
#define _RTE_BYTEORDER_X86_64_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
|
||||
/*
|
||||
* An architecture-optimized byte swap for a 64-bit value.
|
||||
*
|
||||
|
@ -38,6 +38,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rte_common.h>
|
||||
#include "generic/rte_prefetch.h"
|
||||
|
||||
static inline void rte_prefetch0(const volatile void *p)
|
||||
|
@ -20,6 +20,7 @@
|
||||
/* Official RTM intrinsics interface matching gcc/icc, but works
|
||||
on older gcc compatible compilers and binutils. */
|
||||
|
||||
#include <rte_common.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -40,6 +40,8 @@
|
||||
* RTE SSE/AVX related header.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if (defined(__ICC) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
|
||||
|
||||
#ifdef __SSE__
|
||||
|
@ -42,6 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
|
||||
#ifdef __DOXYGEN__
|
||||
|
||||
|
@ -50,6 +50,8 @@
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#include <rte_common.h>
|
||||
|
||||
/*
|
||||
* Compile-time endianness detection
|
||||
*/
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <sched.h>
|
||||
|
||||
#include <rte_per_lcore.h>
|
||||
#include <rte_config.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -44,6 +44,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <rte_config.h>
|
||||
|
||||
#ifdef RTE_EXEC_ENV_LINUXAPP
|
||||
#include <exec-env/rte_dom0_common.h>
|
||||
#endif
|
||||
|
@ -31,6 +31,12 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _RTE_TIME_H_
|
||||
#define _RTE_TIME_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#define NSEC_PER_SEC 1000000000L
|
||||
|
||||
/**
|
||||
@ -120,3 +126,5 @@ rte_ns_to_timespec(uint64_t nsec)
|
||||
|
||||
return ts;
|
||||
}
|
||||
|
||||
#endif /* _RTE_TIME_H_ */
|
||||
|
@ -45,6 +45,7 @@ extern "C" {
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <rte_common.h>
|
||||
|
||||
/**
|
||||
|
@ -34,6 +34,8 @@
|
||||
#ifndef _RTE_DEV_INFO_H_
|
||||
#define _RTE_DEV_INFO_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* Placeholder for accessing device registers
|
||||
*/
|
||||
|
@ -34,6 +34,10 @@
|
||||
#ifndef _RTE_ETH_CTRL_H_
|
||||
#define _RTE_ETH_CTRL_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_common.h>
|
||||
#include "rte_ether.h"
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <rte_byteorder.h>
|
||||
#include <rte_common.h>
|
||||
#include <rte_vect.h>
|
||||
#include <rte_lpm.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <rte_byteorder.h>
|
||||
#include <rte_common.h>
|
||||
#include <rte_vect.h>
|
||||
#include <rte_lpm.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -41,6 +41,10 @@
|
||||
* packet dump library to provide packet capturing support on dpdk.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <rte_mempool.h>
|
||||
#include <rte_ring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -44,6 +44,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <rte_mbuf.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -64,6 +64,7 @@ extern "C" {
|
||||
*
|
||||
***/
|
||||
|
||||
#include <string.h>
|
||||
#include <rte_common.h>
|
||||
#include <rte_debug.h>
|
||||
#include <rte_memory.h>
|
||||
|
@ -22,6 +22,8 @@
|
||||
#ifndef _RTE_RECIPROCAL_H_
|
||||
#define _RTE_RECIPROCAL_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct rte_reciprocal {
|
||||
uint32_t m;
|
||||
uint8_t sh1, sh2;
|
||||
|
@ -38,6 +38,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define __rte_aligned_16 __attribute__((__aligned__(16)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user