From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 6BCCB7E75 for ; Wed, 3 Dec 2014 21:00:17 +0100 (CET) Received: by mail-wg0-f49.google.com with SMTP id n12so12563356wgh.22 for ; Wed, 03 Dec 2014 12:00:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=4RzLSkZv00stb2KCfJhnSb0x4ujMTfQbPvT1KUaKA4Y=; b=ay4mnnLqATe3PIYFBPL4hW4wbp15nv7xaP/wZiGNE5///r4Aj8JU0FHwgsAZ+sW6ce pEW+eOvgC+H5G4jO0brnlJuWEabQrJjpfifF8YRowD5EqmyFSu3WUBOKO2s7j2ARjz04 rtr+yyT+eLdFYHoJnuPEzh2PEpCI6g28SjRsI7ma4sVe8W2niY1vo/DSx5KVygRteBQ/ L+iIDpaMp+pVWRWcIIOfkfAE2NnNhvowKNMlSztw+Jqwf8nfWw8OGT81y3QTd4rAotaN TK/LJY9CwRblKTWJAsIpFFTARj24ggG/74N8mAKbNGc9dPFFVyq+h2D0AnVpHmZhheR9 4pEA== X-Gm-Message-State: ALoCoQniFg/FHqERC77xvQWQpEl9D2MXB1pkHYTQA8BH2+4mCIxB0N7a7T1NW61oHKZCpJFatfGq X-Received: by 10.194.23.10 with SMTP id i10mr9782865wjf.11.1417636817286; Wed, 03 Dec 2014 12:00:17 -0800 (PST) Received: from xps13.localnet (183.20.90.92.rev.sfr.net. [92.90.20.183]) by mx.google.com with ESMTPSA id k5sm30265559wjn.1.2014.12.03.12.00.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Dec 2014 12:00:16 -0800 (PST) From: Thomas Monjalon To: "Qiu, Michael" Date: Wed, 03 Dec 2014 20:59:44 +0100 Message-ID: <283531301.lWbIahXLyM@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <533710CFB86FA344BFBF2D6802E60286C9C636@SHSMSX101.ccr.corp.intel.com> References: <1417606044-3432-1-git-send-email-michael.qiu@intel.com> <533710CFB86FA344BFBF2D6802E60286C9C636@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] test-pmd: Fix "__BYTE_ORDER__" not defined error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 20:00:17 -0000 2014-12-03 16:26, Qiu, Michael: > > --- 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) I don't agree we should fix it in testpmd. It's a more general problem which must be solved in EAL. I'm preparing a patchset to fix it. -- Thomas