From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0139.outbound.protection.outlook.com [65.55.169.139]) by dpdk.org (Postfix) with ESMTP id 69A629AB5 for ; Tue, 24 Mar 2015 08:28:12 +0100 (CET) Received: from BY1PR03MB1339.namprd03.prod.outlook.com (25.162.109.21) by BY1PR03MB1340.namprd03.prod.outlook.com (25.162.109.22) with Microsoft SMTP Server (TLS) id 15.1.118.21; Tue, 24 Mar 2015 07:28:10 +0000 Received: from BY1PR03MB1339.namprd03.prod.outlook.com ([25.162.109.21]) by BY1PR03MB1339.namprd03.prod.outlook.com ([25.162.109.21]) with mapi id 15.01.0118.021; Tue, 24 Mar 2015 07:28:10 +0000 From: Xuelin Shi To: Thomas Monjalon Thread-Topic: [PATCH] librte_lpm: define tbl entry reversely for big endian Thread-Index: AQHQVkwTRHBXawDUCUCXZrIO3df0uZ0UNs2AgBYBAICAASNDYA== Date: Tue, 24 Mar 2015 07:28:10 +0000 Message-ID: References: <1425450852-24837-1-git-send-email-xuelin.shi@freescale.com> <20150309140237.GB5848@bricha3-MOBL3> <1898378.inXpMq60NG@xps13> In-Reply-To: <1898378.inXpMq60NG@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.59.231.64] authentication-results: 6wind.com; dkim=none (message not signed) header.d=none; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1340; x-microsoft-antispam-prvs: x-forefront-antispam-report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(377424004)(13464003)(24454002)(164054003)(51704005)(19580395003)(76576001)(92566002)(102836002)(2950100001)(66066001)(15975445007)(46102003)(19580405001)(2900100001)(77156002)(62966003)(122556002)(74316001)(76176999)(50986999)(54356999)(2656002)(33656002)(110136001)(106116001)(40100003)(87936001)(86362001)(99286002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1340; H:BY1PR03MB1339.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:BY1PR03MB1340; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1340; x-forefront-prvs: 0525BB0ADF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2015 07:28:10.1656 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1340 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] librte_lpm: define tbl entry reversely for big endian 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: Tue, 24 Mar 2015 07:28:13 -0000 Hi Thomas, Done. http://patchwork.dpdk.org/dev/patchwork/patch/4122/ Thanks, Xuelin Shi > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, March 23, 2015 22:04 > To: Shi Xuelin-B29237 > Cc: Bruce Richardson; dev@dpdk.org > Subject: Re: [PATCH] librte_lpm: define tbl entry reversely for big > endian >=20 > 2015-03-09 14:02, Bruce Richardson: > > On Wed, Mar 04, 2015 at 02:34:12PM +0800, xuelin.shi@freescale.com > wrote: > > > From: Xuelin Shi > > > > > > 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 > > > > 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 =3D=3D RTE_LITTLE_ENDIAN > > ^ > > 1 error generated. > > > > Adding "#include " should fix the issue. >=20 > Please Xuelin, could you submit a v2? > Thanks >=20 > > 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 > > >=20