DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Qiu, Michael" <michael.qiu@intel.com>
To: "thomas.monjalon@6wind.com" <thomas.monjalon@6wind.com>,
	Michael Qiu <qdy220091330@gmail.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"chaozhu@linux.vnet.ibm.com" <chaozhu@linux.vnet.ibm.com>
Subject: Re: [dpdk-dev] [PATCH v2] Fix two compile issues with i686 platform
Date: Thu, 4 Dec 2014 02:49:24 +0000	[thread overview]
Message-ID: <533710CFB86FA344BFBF2D6802E60286C9C8C7@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20141203154029.GA6340@bricha3-MOBL3>

On 12/3/2014 11:40 PM, Richardson, Bruce wrote:
> On Wed, Dec 03, 2014 at 04:10:23PM +0800, Michael Qiu wrote:
>> lib/librte_eal/linuxapp/eal/eal_memory.c:324:4: error: comparison
>> is always false due to limited range of data type [-Werror=type-limits]
>>     || (hugepage_sz == RTE_PGSIZE_16G)) {
>>     ^
>> cc1: all warnings being treated as errors
>>
>> lib/librte_eal/linuxapp/eal/eal.c(461): error #2259: non-pointer
>> conversion from "long long" to "void *" may lose significant bits
>>    RTE_PTR_ALIGN_CEIL((uintptr_t)addr, RTE_PGSIZE_16M);
>>
>> This was introuduced by commit b77b5639:
>>         mem: add huge page sizes for IBM Power
>>
>> The root cause is that size_t and uintptr_t are 32-bit in i686
>> platform, but RTE_PGSIZE_16M and RTE_PGSIZE_16G are always 64-bit.
>>
>> Define RTE_PGSIZE_16G only in 64 bit platform to avoid
>> this issue.
>>
>> Signed-off-by: Michael Qiu <michael.qiu@intel.com>
> Minor comment below.
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
>> ---
>>  app/test/test_memzone.c                    | 18 ++++++++++++------
>>  lib/librte_eal/common/eal_common_memzone.c |  2 ++
>>  lib/librte_eal/common/include/rte_memory.h | 14 ++++++++------
>>  lib/librte_eal/linuxapp/eal/eal_memory.c   | 12 +++++-------
>>  4 files changed, 27 insertions(+), 19 deletions(-)
>>
> ... snip ...
>> --- a/lib/librte_eal/common/include/rte_memory.h
>> +++ b/lib/librte_eal/common/include/rte_memory.h
>> @@ -53,12 +53,14 @@ extern "C" {
>>  #endif
>>  
>>  enum rte_page_sizes {
>> -	RTE_PGSIZE_4K = 1ULL << 12,
>> -	RTE_PGSIZE_2M = 1ULL << 21,
>> -	RTE_PGSIZE_1G = 1ULL << 30,
>> -	RTE_PGSIZE_64K = 1ULL << 16,
>> -	RTE_PGSIZE_16M = 1ULL << 24,
>> -	RTE_PGSIZE_16G = 1ULL << 34
>> +	RTE_PGSIZE_4K	= 1UL << 12,
>> +	RTE_PGSIZE_2M	= 1UL << 21,
>> +	RTE_PGSIZE_1G	= 1UL << 30,
>> +	RTE_PGSIZE_64K	= 1UL << 16,
>> +	RTE_PGSIZE_16M	= 1UL << 24,
>> +#ifdef RTE_ARCH_64
>> +	RTE_PGSIZE_16G	= 1ULL << 34
> you don't need the "LL" here as long type is 64-bits on 64-bit systems. Changing
> it to 1UL << 34 will keep all entries consistent.

Hi Thomas,

Should I resend V3 patch to modify this or you can do it when you plan
to merge this patch?

Thanks,
Michael
>


  reply	other threads:[~2014-12-04  2:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1417329845-7482-1-git-send-email-michael.qiu@intel.com>
     [not found] ` <1417594223-2573-1-git-send-email-michael.qiu@intel.com>
2014-12-03 11:32   ` Qiu, Michael
2014-12-03 15:40   ` Bruce Richardson
2014-12-04  2:49     ` Qiu, Michael [this message]
2014-12-04  9:03       ` Thomas Monjalon
2014-12-04 10:21         ` Qiu, Michael
2014-12-04  9:12           ` [dpdk-dev] [PATCH v3] " Michael Qiu
2014-12-05  6:56             ` Qiu, Michael
2014-12-05  7:04               ` Chao Zhu
2014-12-05  8:31             ` Chao Zhu
2014-12-05 14:22               ` Neil Horman
2014-12-05 15:02                 ` Bruce Richardson
2014-12-05 15:24                   ` Neil Horman
2014-12-08  2:46                     ` Qiu, Michael
2014-12-08  2:59                       ` Neil Horman
2014-12-08  3:37                         ` Qiu, Michael
2014-12-08  4:57                           ` Qiu, Michael
2014-12-08 11:37                           ` Neil Horman
2014-12-08 11:50                             ` Thomas Monjalon
2014-12-08 14:59                             ` Qiu, Michael
2014-12-10 10:46             ` [dpdk-dev] [PATCH 0/2 v4] " Michael Qiu
2014-12-10 10:46               ` [dpdk-dev] [PATCH 1/2 v4] Fix compile issue with hugepage_sz in 32-bit system Michael Qiu
2014-12-10 10:46               ` [dpdk-dev] [PATCH 2/2] Fix compile issue of eal with icc compile Michael Qiu
2014-12-11  0:56               ` [dpdk-dev] [PATCH 0/2 v4] Fix two compile issues with i686 platform Thomas Monjalon
2014-12-11 13:25                 ` Neil Horman
2014-12-11 15:28                   ` Qiu, Michael
2014-12-11 21:21                     ` Thomas Monjalon
2014-12-12 11:38                       ` Neil Horman
2014-12-12 15:09                         ` Thomas Monjalon
2014-12-12 15:29                           ` Neil Horman

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=533710CFB86FA344BFBF2D6802E60286C9C8C7@SHSMSX101.ccr.corp.intel.com \
    --to=michael.qiu@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chaozhu@linux.vnet.ibm.com \
    --cc=dev@dpdk.org \
    --cc=qdy220091330@gmail.com \
    --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).