DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: dev <dev@dpdk.org>, Felix Marti <felix@chelsio.com>,
	Nirranjan Kirubaharan <nirranjan@chelsio.com>,
	Kumar Sanghvi <kumaras@chelsio.com>
Subject: Re: [dpdk-dev] [PATCH v2] vfio: Fix overflow while assigning vfio BAR region offset and size
Date: Tue, 7 Jul 2015 16:10:38 +0530	[thread overview]
Message-ID: <20150707104036.GA20819@scalar.blr.asicdesigners.com> (raw)
In-Reply-To: <C6ECDF3AB251BE4894318F4E4512369780CCE9B9@IRSMSX109.ger.corp.intel.com>

Hi Anatoly,

On Tue, Jul 07, 2015 at 09:08:08 +0000, Burakov, Anatoly wrote:
> Hi all,
> 
> > So, as VFIO support for 32bit systems is broken, DPDK should not configure VFIO in that case.
> 
> ...Or no one should try and run VFIO on a 32-bit system, which should be noted in documentation. I'm a bit wary of adding special handling in this case.
> 
> Does making the offset off_t fix the compile issues for 32 bit kernel?
> 

Making offset off_t seems to fail for x86_x32-native-linuxapp-gcc target with
the following error in 64-bit gcc, but is working fine with i686 and
x86_64 targets:

/home/ubuntu/dpdk/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c: In function ‘pci_vfio_map_resource’:
/home/ubuntu/dpdk/x86_x32-native-linuxapp-gcc/include/rte_common.h:90:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
 #define RTE_PTR_ADD(ptr, x) ((void*)((uintptr_t)(ptr) + (x)))
                              ^
/home/ubuntu/dpdk/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c:816:25: note: in expansion of macro ‘RTE_PTR_ADD’
     void *second_addr = RTE_PTR_ADD(bar_addr, memreg[1].offset);
                         ^
cc1: all warnings being treated as errors
make[7]: *** [eal_pci_vfio.o] Error 1
make[6]: *** [eal] Error 2
make[5]: *** [linuxapp] Error 2
make[4]: *** [librte_eal] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [all] Error 2
make[1]: *** [x86_x32-native-linuxapp-gcc_install] Error 2
make: *** [install] Error 2

However, unsigned long seems to be working fine for all builds.

Thanks,
Rahul

  reply	other threads:[~2015-07-07 10:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 14:16 [dpdk-dev] [PATCH] " Rahul Lakkireddy
2015-06-17 12:09 ` Thomas Monjalon
2015-06-18 14:23   ` Rahul Lakkireddy
2015-06-23 15:00 ` [dpdk-dev] [PATCH v2] " Rahul Lakkireddy
2015-06-30 21:12   ` Thomas Monjalon
2015-07-01  8:34     ` Alejandro Lucero
2015-07-01 10:00       ` Burakov, Anatoly
2015-07-06 15:45         ` Alejandro Lucero
2015-07-07  7:56           ` Rahul Lakkireddy
2015-07-07  9:08           ` Burakov, Anatoly
2015-07-07 10:40             ` Rahul Lakkireddy [this message]
2015-07-07 10:50               ` Burakov, Anatoly
2015-07-10  9:54                 ` Rahul Lakkireddy
2015-07-10 17:27                   ` Alejandro Lucero
2015-07-13  8:51   ` [dpdk-dev] [PATCH v3] " Rahul Lakkireddy
2015-07-14  8:56     ` 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=20150707104036.GA20819@scalar.blr.asicdesigners.com \
    --to=rahul.lakkireddy@chelsio.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=felix@chelsio.com \
    --cc=kumaras@chelsio.com \
    --cc=nirranjan@chelsio.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).