From: Jia Yu <jyu@vmware.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] lib: include rte_memory.h for __rte_cache_aligned
Date: Mon, 17 Nov 2014 19:07:31 +0000 [thread overview]
Message-ID: <D08F8411.2C35C%jyu@vmware.com> (raw)
In-Reply-To: <2488601.0HJ4lVigCM@xps13>
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@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
next prev parent reply other threads:[~2014-11-17 18:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 17:28 Jia Yu
2014-11-10 9:46 ` Thomas Monjalon
2014-11-17 19:07 ` Jia Yu [this message]
2014-12-08 15:04 ` [dpdk-dev] " Neil Horman
2014-12-09 8:53 ` Olivier MATZ
2014-12-09 9:11 ` Jia Yu
2014-12-09 15:22 ` Neil Horman
2014-12-10 19:09 ` Jia Yu
2014-12-11 0:28 ` Neil Horman
2014-12-11 0:36 ` Thomas Monjalon
2014-12-11 14:17 ` Neil Horman
2014-12-11 21:14 ` Thomas Monjalon
2014-12-11 0:51 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D08F8411.2C35C%jyu@vmware.com \
--to=jyu@vmware.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).