DPDK usage discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Michael Wildt <michael.wildt@broadcom.com>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] Cross compile for ARM64 fails due to librte_vhost and pmdinfogen issues
Date: Tue, 13 Sep 2016 17:07:24 +0200	[thread overview]
Message-ID: <2164887.AxsOo2R2xv@xps13> (raw)
In-Reply-To: <CAN_brw2bwNRbnevzencbsedfoZp_8kWMVogUSoUVfjULjR+HxA@mail.gmail.com>

2016-09-13 07:45, Michael Wildt:
> Hi Thomas,
> 
> Appreciate the assistance. Please see inline.
> 
> 
> On Tue, Sep 13, 2016 at 5:03 AM, Thomas Monjalon <thomas.monjalon@6wind.com>
> wrote:
> 
> > Hi,
> >
> > 2016-09-12 22:20, Michael Wildt:
> > > I'm attempting to cross compile DPDK on an x86 for an ARM64 target. This
> > > fails in the following areas, using latest dpdk as of 9/12. When
> > compiling
> > > natively there are no issues.
> >
> > Your analysis below seems good.
> > Interestingly, I do not see such error (don't know why).
> > Please could you share the commands you are using?
> >
> 
> Sure can.
> 
> make config T=arm64-armv8a-linuxapp-gcc CROSS=/projects/ccxsw/
> toolchains/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/aarch64-linux-gnu-
> ARCH=arm64
> 
> make T=arm64-armv8a-linuxapp-gcc CROSS=/projects/ccxsw/
> toolchains/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/aarch64-linux-gnu-
> ARCH=arm64 RTE_KERNELDIR=/projects/kernel
> 
> > > - librte_vhost, fails with:
> > >
> > > /projects/dpdk_latest/lib/librte_vhost/vhost_user/virtio-
> > net-user.c:250:23:
> > > error: array subscript is above array bounds [-Werror=array-bounds]
> > >    rvq = dev->virtqueue[i * VIRTIO_QNUM + VIRTIO_RXQ];
> > [...]
> > > - buildtools/pmdinfogen, fails with:
> > >
> > > == Build buildtools/pmdinfogen
> > >   HOSTCC pmdinfogen.o
> > > /projects/dpdk_test_wget/dpdk-16.07/build/include/rte_byteorder.h:
> > > Assembler messages:
> > > /projects/dpdk_test_wget/dpdk-16.07/build/include/rte_byteorder.h:53:
> > > Error: no such instruction: `rev16 %bx,%bx'
> > [...]
> > >   - The issue is due to the rte_byteorder.h file which gets
> > >   symlink'ed with the ARM version at the beginning of the build.
> > >   The pmdinfogen is always compiled for x86 thus the asm is failing.

It is definitely something to fix.
In the meantime, you should be able to compile DPDK by using a more recent
toolchain. This error is in:

/* fix missing __builtin_bswap16 for gcc older then 4.8 */
#if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))

I know you are using gcc-4.9 but maybe __GNUC_MINOR__ is wrong in yours.

  reply	other threads:[~2016-09-13 15:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  2:20 Michael Wildt
     [not found] ` <2139728.s9C09RKb8B@xps13>
2016-09-13 11:45   ` Michael Wildt
2016-09-13 15:07     ` Thomas Monjalon [this message]
2016-09-13 18:35       ` Michael Wildt
2016-09-14  7:25         ` Hemant Agrawal
2016-09-14 13:47           ` Michael Wildt

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=2164887.AxsOo2R2xv@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=michael.wildt@broadcom.com \
    --cc=users@dpdk.org \
    /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).