0d440d081c
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 check-includes.sh 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:
|
||
---|---|---|
.. | ||
Makefile | ||
rte_lru_arm64.h | ||
rte_lru_x86.h | ||
rte_lru.h | ||
rte_table_acl.c | ||
rte_table_acl.h | ||
rte_table_array.c | ||
rte_table_array.h | ||
rte_table_hash_cuckoo.c | ||
rte_table_hash_ext.c | ||
rte_table_hash_key8.c | ||
rte_table_hash_key16.c | ||
rte_table_hash_key32.c | ||
rte_table_hash_lru.c | ||
rte_table_hash.h | ||
rte_table_lpm_ipv6.c | ||
rte_table_lpm_ipv6.h | ||
rte_table_lpm.c | ||
rte_table_lpm.h | ||
rte_table_stub.c | ||
rte_table_stub.h | ||
rte_table_version.map | ||
rte_table.h |