path: root/lib/librte_ip_frag
diff options
authorAdrien Mazarguil <>2017-12-21 14:00:04 +0100
committerThomas Monjalon <>2018-01-17 00:31:05 +0100
commit0d440d081ca1b5cccbb3b991908842c70731e460 (patch)
treee756501a610d9c0aebfc6c2c34b760e5dd9c00ab /lib/librte_ip_frag
parent34c709f9b21cc5bc9bad338e908ebca08a6dfc37 (diff)
lib: fix missing includes in exported headers
Many exported headers rely on definitions found in rte_config.h without including it, as shown by the following command: grep -L '^#include <rte_config.h>' -- \ $(grep -Rl \ $(sed -n '/^#define \([^ ]\+\).*$/{s//\1/;H;};${x;s/\n//;s/\n/\\|/g;p;}' \ build/include/rte_config.h) \ -- build/include/) We cannot assume external applications will include rte_config.h on their own, neither directly nor through a -include parameter like DPDK does internally. This not only causes obvious compilation failures that can be reproduced with such as: [...]/rte_memory.h:88:43: error: ‘RTE_CACHE_LINE_SIZE’ was not declared in this scope #define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE) ^ It also results in less visible issues, for instance rte_hash_crc.h relying on RTE_ARCH_X86_64's presence to provide dedicated inline functions. This patch partially reverts the commit below and adds missing include lines to the remaining files. Fixes: f1a7a5c5f404 ("remove include of generated config header") Cc: Signed-off-by: Adrien Mazarguil <> Acked-by: Thomas Monjalon <>
Diffstat (limited to 'lib/librte_ip_frag')
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index b24bade..b3f3f78 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib/librte_ip_frag/rte_ip_frag.h
@@ -19,6 +19,7 @@ extern "C" {
#include <stdint.h>
#include <stdio.h>
+#include <rte_config.h>
#include <rte_malloc.h>
#include <rte_memory.h>
#include <rte_ip.h>