path: root/lib/librte_lpm
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_lpm
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_lpm')
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h
index 12c22a6..2155044 100644
--- a/lib/librte_lpm/rte_lpm.h
+++ b/lib/librte_lpm/rte_lpm.h
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <rte_branch_prediction.h>
#include <rte_byteorder.h>
+#include <rte_config.h>
#include <rte_memory.h>
#include <rte_common.h>
#include <rte_vect.h>