[dpdk-dev] [PATCH] lib: include rte_memory.h for __rte_cache_aligned
Jia Yu
jyu at vmware.com
Mon Nov 17 20:07:31 CET 2014
Thanks for reviewing this change.
No error message was found without this patch. This patch follows a good
coding practice to include the header files when it¹s needed, rather than
through some other header files. In the past, we found some data structure
was not cache line aligned due to missing the include, and caused memory
corruption. Compiler did not give warning or error when
__rte_cache_aligned attribute definition is missing. With DPDK latest, I
checked the data structures that used __rte_cache_aligned attributed in
these files, and they are properly aligned. So this patch is mainly for
better coding style now.
pahole -s libfile.[o, a]
ip_frag_pkt 192 1
ip_frag_tbl_stat 64 0
malloc_elem 64 0
rte_mbuf 128 1
rte_table_lpm 1088 1
rte_table_hash 64 1
Thanks,
Jia
On 11/10/14, 1:46 AM, "Thomas Monjalon" <thomas.monjalon at 6wind.com> wrote:
>2014-11-07 09:28, Jia Yu:
>> Include rte_memory.h for lib files that use __rte_cache_aligned
>> attribute.
>
>Please could you explain what was the error?
>As I suspect it's a fix, it would be clearer to start your title with
>"fix".
>
>Thanks
>--
>Thomas
More information about the dev
mailing list