From: Tiwei Bie <tiwei.bie@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>,
David Christensen <drc@linux.vnet.ibm.com>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] vhost: fix build error caused by 64bit print formatting
Date: Fri, 25 Oct 2019 12:38:12 +0800 [thread overview]
Message-ID: <20191025043812.GA3520@___> (raw)
In-Reply-To: <CAJFAV8xyy7TJhDPjpFMzv0f15DX65TmoTmGHyxVJRwUEz3=5xg@mail.gmail.com>
On Thu, Oct 24, 2019 at 09:27:38PM +0200, David Marchand wrote:
> On Mon, Aug 19, 2019 at 1:41 PM Maxime Coquelin
> <maxime.coquelin@redhat.com> wrote:
> > On 8/19/19 10:40 AM, David Marchand wrote:
> > > On Thu, Aug 15, 2019 at 6:16 PM David Christensen
> > > <drc@linux.vnet.ibm.com> wrote:
> > >>
> > >>>> Use of %llx print formatting causes meson build error on Power systems with
> > >>>> RHEL 7.6 and gcc 4.8.5. Replace with PRIx64 macro.
> > >>>>
> > >>>> + (uint64_t)reg_struct.range.start,
> > >>>> + (uint64_t)reg_struct.range.start +
> > >>>> + (uint64_t)reg_struct.range.len - 1);
> > >>
> > >> I didn't need them when compiling on Power but it's the only way I could
> > >> get x86 to build without any warning:
> > >>
> > >> cc -Ilib/lib@@rte_vhost@sta -Ilib -I../lib -Ilib/librte_vhost
> > >> -I../lib/librte_vhost -I. -I../ -Iconfig -I../config
> > >> -Ilib/librte_eal/common/include -I../lib/librte_eal/common/include
> > >> -I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common
> > >> -I../lib/librte_eal/common -Ilib/librte_eal/common/include/arch/x86
> > >> -I../lib/librte_eal/common/include/arch/x86 -Ilib/librte_eal
> > >> -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs
> > >> -Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_net
> > >> -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf
> > >> -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring
> > >> -I../lib/librte_ring -Ilib/librte_meter -I../lib/librte_meter
> > >> -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_hash
> > >> -I../lib/librte_hash -Ilib/librte_pci -I../lib/librte_pci -pipe
> > >> -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h
> > >> -Wunused-parameter -Wsign-compare -Wcast-qual -D_GNU_SOURCE -fPIC
> > >> -march=native -fno-strict-aliasing -DALLOW_EXPERIMENTAL_API -MD -MQ
> > >> 'lib/lib@@rte_vhost@sta/librte_vhost_vhost_user.c.o' -MF
> > >> 'lib/lib@@rte_vhost@sta/librte_vhost_vhost_user.c.o.d' -o
> > >> 'lib/lib@@rte_vhost@sta/librte_vhost_vhost_user.c.o' -c
> > >> ../lib/librte_vhost/vhost_user.c
> > >> ../lib/librte_vhost/vhost_user.c: In function ‘vhost_user_set_mem_table’:
> > >> ../lib/librte_vhost/vhost_user.c:1088:4: warning: format ‘%lx’ expects
> > >> argument of type ‘long unsigned int’, but argument 4 has type ‘__u64’
> > >> [-Wformat=]
> > >> RTE_LOG(INFO, VHOST_CONFIG,
> > >> ^
> > >> ../lib/librte_vhost/vhost_user.c:1088:4: warning: format ‘%lx’ expects
> > >> argument of type ‘long unsigned int’, but argument 5 has type ‘__u64’
> > >> [-Wformat=]
> > >>
> > >> This system was also RHEL 7.6 with gcc 4.8.5-36
> > >
> > > Ok, I run the same.
> > > The catch is that I did not have RTE_LIBRTE_VHOST_POSTCOPY enabled in
> > > my working environment (using make) while meson enables it as long as
> > > userfaultd.h is present.
> > >
> > > Maxime, Tiwei,
> > >
> > > Can't we use uintXX_t instead of (what looks to me) kernel types __uXX ?
> > >
> > >
> >
> > That actually comes from a kernel header (linux/userfaultfd.h), so I
> > would say no.
>
> Sorry, I had forgotten about this patch.
> Seems fine to me then.
> Maxime, Tiwei?
LGTM as well.
>
>
> --
> David Marchand
next prev parent reply other threads:[~2019-10-25 4:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 18:36 [dpdk-dev] [PATCH 0/2] fixes to resolve meson build issues on Power systems David Christensen
2019-08-14 18:36 ` [dpdk-dev] [PATCH 1/2] config: fix RHEL7.6 build errors on Power 9 systems David Christensen
2019-10-25 18:52 ` David Christensen
2019-10-27 10:04 ` David Marchand
2019-08-14 18:36 ` [dpdk-dev] [PATCH 2/2] vhost: fix build error caused by 64bit print formatting David Christensen
2019-08-15 6:53 ` David Marchand
2019-08-15 16:16 ` David Christensen
2019-08-19 8:40 ` David Marchand
2019-08-19 11:41 ` Maxime Coquelin
2019-10-24 19:27 ` David Marchand
2019-10-25 4:38 ` Tiwei Bie [this message]
2019-10-25 4:41 ` Tiwei Bie
2019-10-27 10:04 ` David Marchand
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=20191025043812.GA3520@___ \
--to=tiwei.bie@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=drc@linux.vnet.ibm.com \
--cc=maxime.coquelin@redhat.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).