From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
dev@dpdk.org, Hemant Agrawal <hemant.agrawal@nxp.com>,
Jerin Jacob <Jerin.Jacob@cavium.com>,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] pmdinfogen: Fix pmdinfogen to select proper endianess on cross-compile
Date: Thu, 01 Dec 2016 16:17:44 +0100 [thread overview]
Message-ID: <2826296.pI5ECjk531@xps13> (raw)
In-Reply-To: <20161121101133.GC16124@bricha3-MOBL3.ger.corp.intel.com>
2016-11-21 10:11, Bruce Richardson:
> On Fri, Nov 18, 2016 at 01:47:52PM -0500, Neil Horman wrote:
> > pmdinfogen has a bug in which, during build, it pulls in rte_byteorder.h to
> > obtain the rte macros for byteswapping between the cpu byte order and big or
> > little endian. Unfortunately, pmdinfogen is a tool that is only meant to be run
> > during the build of dpdk components, and so, it runs on the host. In cross
> > compile environments however, the rte_byteorder.h is configured using a target
> > cpu, who's endianess may differ from that of the host, leading to improper
> > swapping.
> >
> > The fix is to use host system defined byte swapping routines rather than the
> > dpdk provided routines. Note that we are using non posix compliant routines, as
> > the posix compliant api only addresses 16 and 32 bit swaps, and we also need 64
> > bit swaps. Those macros exist (via endian.h), but BSD and Linux put that header
> > in different locations so some ifdeffery is required.
> >
> > Tested successfully by myself on Linux and BSD systems.
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > CC: Hemant Agrawal <hemant.agrawal@nxp.com>
> > CC: Jerin Jacob <Jerin.Jacob@cavium.com>
> > CC: Bruce Richardson <bruce.richardson@intel.com>
> > CC: Thomas Monjalon <thomas.monjalon@6wind.com>
> > ---
> > buildtools/pmdinfogen/pmdinfogen.h | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
>
> Compiles fine on FreeBSD with clang.
>
> Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Fixed "endianness" typo, headline, added Fixes:, CC: stable@dpdk.org and removed a trailing whitespace, then
applied, thanks
prev parent reply other threads:[~2016-12-01 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 18:47 Neil Horman
2016-11-21 10:11 ` Bruce Richardson
2016-12-01 15:17 ` Thomas Monjalon [this message]
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=2826296.pI5ECjk531@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=Jerin.Jacob@cavium.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=nhorman@tuxdriver.com \
--cc=stable@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).