dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: xuelin.shi-KZfg59tc24xl57MIdRCFDg@public.gmane.org
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] librte_lpm: define tbl entry reversely for big endian
Date: Mon, 23 Mar 2015 15:03:55 +0100	[thread overview]
Message-ID: <1898378.inXpMq60NG@xps13> (raw)
In-Reply-To: <20150309140237.GB5848@bricha3-MOBL3>

2015-03-09 14:02, Bruce Richardson:
> On Wed, Mar 04, 2015 at 02:34:12PM +0800, xuelin.shi-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> > From: Xuelin Shi <xuelin.shi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> > 
> > This module uses type conversion between struct and int.
> > Also truncation and comparison is used with this int.
> > It is not safe for different endian arch.
> > 
> > Add ifdef for big endian struct to fix this issue.
> > 
> > Signed-off-by: Xuelin Shi <xuelin.shi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> 
> Get an error compiling this up (using clang on FreeBSD).
> 
>   CC rte_lpm.o
>   In file included from /usr/home/bruce/dpdk.org/lib/librte_lpm/rte_lpm.c:57:
>   /usr/home/bruce/dpdk.org/lib/librte_lpm/rte_lpm.h:99:5: fatal error: 'RTE_BYTE_ORDER' is not defined, evaluates to 0 [-Wundef]
> #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
>       ^
>       1 error generated.
> 
> Adding "#include <rte_byteorder.h>" should fix the issue.

Please Xuelin, could you submit a v2?
Thanks

> Existing unit tests on IA (little endian) pass fine there-after, but I think for
> this patch it would be good to have an ack from someone who can validate on
> a big endian system, since this is what this patch is meant to enable.
> 
> /Bruce
> 

  reply	other threads:[~2015-03-23 14:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  6:34 [PATCH] librte_lpm: define tbl entry reversely for big endian xuelin.shi-KZfg59tc24xl57MIdRCFDg
     [not found] ` <1425450852-24837-1-git-send-email-xuelin.shi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-03-04 10:48   ` Bruce Richardson
2015-03-05  2:12     ` Xuelin Shi
     [not found]       ` <CY1PR0301MB0684CE6F8F332B4F7DD45089861F0-YrwGdl+PljnlCq1ddutYi5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-03-06 11:13         ` Bruce Richardson
2015-03-09  1:54           ` Xuelin Shi
     [not found]             ` <CY1PR0301MB0684F68641BAFBDBF80BCFB2861B0-YrwGdl+PljnlCq1ddutYi5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-03-09  9:12               ` Mcnamara, John
     [not found]                 ` <B27915DBBA3421428155699D51E4CFE2ECC24F-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-09  9:35                   ` Xuelin Shi
2015-03-09 14:04                   ` Thomas Monjalon
2015-03-09 14:02   ` Bruce Richardson
2015-03-23 14:03     ` Thomas Monjalon [this message]
2015-03-24  7:28       ` Xuelin Shi

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=1898378.inXpMq60NG@xps13 \
    --to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=xuelin.shi-KZfg59tc24xl57MIdRCFDg@public.gmane.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).