DPDK patches and discussions
 help / color / mirror / Atom feed
  • * Re: [dpdk-dev] [PATCH] test-pmd: Fix "__BYTE_ORDER__" not defined error
           [not found] <1417606044-3432-1-git-send-email-michael.qiu@intel.com>
           [not found] ` <1417606099-3489-1-git-send-email-michael.qiu@intel.com>
    @ 2014-12-03 16:26 ` Qiu, Michael
      2014-12-03 19:59   ` Thomas Monjalon
      1 sibling, 1 reply; 32+ messages in thread
    From: Qiu, Michael @ 2014-12-03 16:26 UTC (permalink / raw)
      To: Michael Qiu, dev
    
    Hi all,
    
    What about this patch?
    
    It may be some network or mail client issue of me, so not sure this
    patch posted to mail list successful.
    
    If failed, I will re-post it later.
    
    Thanks,
    Michael
    
    On 2014/12/3 19:28, Michael Qiu wrote:
    > app/test-pmd/csumonly.c:84:5: error: "__BYTE_ORDER__" is not defined
    > app/test-pmd/csumonly.c:84:23: error: "__ORDER_LITTLE_ENDIAN__" is not defined
    >
    > This because old gcc version, like 4.4.7, does not has these buildin macros.
    >
    > $ gcc -v
    > Using built-in specs.
    > Target: x86_64-redhat-linux
    > ...
    > gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
    >
    > $ echo | gcc -dM -E -| grep "LITTLE"
    > (none)
    >
    > In this situation, we should back to use the macros defined in
    > <endian.h>
    >
    > Signed-off-by: Michael Qiu <michael.qiu@intel.com>
    > ---
    >  app/test-pmd/csumonly.c | 8 +++++++-
    >  1 file changed, 7 insertions(+), 1 deletion(-)
    >
    > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
    > index 6f43761..3fa81a2 100644
    > --- a/app/test-pmd/csumonly.c
    > +++ b/app/test-pmd/csumonly.c
    > @@ -81,7 +81,13 @@
    >  
    >  /* we cannot use htons() from arpa/inet.h due to name conflicts, and we
    >   * cannot use rte_cpu_to_be_16() on a constant in a switch/case */
    > -#if  __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
    > +#ifdef __BYTE_ORDER__
    > +#define LITTLE_ENDIAN_CHECK (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
    > +#else
    > +#define LITTLE_ENDIAN_CHECK (__BYTE_ORDER == __LITTLE_ENDIAN)
    > +#endif
    > +
    > +#if LITTLE_ENDIAN_CHECK
    >  #define _htons(x) ((uint16_t)((((x) & 0x00ffU) << 8) | (((x) & 0xff00U) >> 8)))
    >  #else
    >  #define _htons(x) (x)
    
    
    ^ permalink raw reply	[flat|nested] 32+ messages in thread

  • end of thread, other threads:[~2014-12-12  6:51 UTC | newest]
    
    Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <1417606044-3432-1-git-send-email-michael.qiu@intel.com>
         [not found] ` <1417606099-3489-1-git-send-email-michael.qiu@intel.com>
    2014-12-03 11:42   ` [dpdk-dev] [PATCH] test-pmd: Fix pointer aliasing error Bruce Richardson
    2014-12-03 13:59     ` Qiu, Michael
    2014-12-03 14:51       ` Bruce Richardson
    2014-12-03 15:19         ` Qiu, Michael
    2014-12-03 15:36           ` Bruce Richardson
    2014-12-04  2:38             ` Qiu, Michael
    2014-12-04  3:28               ` [dpdk-dev] [PATCH v2] " Michael Qiu
    2014-12-04  4:16                 ` [dpdk-dev] [PATCH v3] " Michael Qiu
    2014-12-05  5:34                   ` Qiu, Michael
    2014-12-05  9:24                     ` Thomas Monjalon
    2014-12-08  1:28                       ` Qiu, Michael
    2014-12-08  1:30                   ` Qiu, Michael
    2014-12-10  3:44                     ` Qiu, Michael
    2014-12-11  0:54                     ` Thomas Monjalon
    2014-12-11 17:51                       ` r k
    2014-12-12  6:49                         ` Qiu, Michael
    2014-12-04 12:54                 ` [dpdk-dev] [PATCH v2] " Ananyev, Konstantin
    2014-12-03 15:24     ` [dpdk-dev] [PATCH] " Olivier MATZ
    2014-12-03 16:03       ` Dayu Qiu
    2014-12-03 15:57     ` Dayu Qiu
    2014-12-03 16:26 ` [dpdk-dev] [PATCH] test-pmd: Fix "__BYTE_ORDER__" not defined error Qiu, Michael
    2014-12-03 19:59   ` Thomas Monjalon
    2014-12-03 20:47     ` [dpdk-dev] [PATCH 0/2] fix endianness in EAL Thomas Monjalon
    2014-12-03 20:47       ` [dpdk-dev] [PATCH 1/2] eal: detect endianness Thomas Monjalon
    2014-12-04  2:28         ` Qiu, Michael
    2014-12-04  9:00           ` Thomas Monjalon
    2014-12-04 10:28             ` Qiu, Michael
    2014-12-04 12:19               ` Thomas Monjalon
    2014-12-04 12:50                 ` Qiu, Michael
    2014-12-03 20:47       ` [dpdk-dev] [PATCH 2/2] app/testpmd: fix endianness detection Thomas Monjalon
    2014-12-04  9:28       ` [dpdk-dev] [PATCH 0/2] fix endianness in EAL Chao Zhu
    2014-12-05 16:01         ` Thomas Monjalon
    

    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).