From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 4C82658EC for ; Thu, 1 Dec 2016 16:17:46 +0100 (CET) Received: by mail-wm0-f41.google.com with SMTP id g23so302611110wme.1 for ; Thu, 01 Dec 2016 07:17:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pzr8fsuDL5gmbBOXlrOy4ZH3rjcklaDKzoIttRIVi68=; b=018yJR1fOHgzZSDw7aGOWm3Vf7u/Q47KBVVzzFrt7XHcuTi8cVCOy7VoBpR9CUlU50 AmB5+nsccsnhXzxzVp6sdjjWsnn8/0jKkAXWeMlAHSu6pVWHEsD1oRlCTsyAYXh3SuXS VvqGAGFtwd7gl/6AEsdmQNMdAZFRT+tkTM1sH+mbux9ofg3WzIqciwjmawtJuEjBKAez tVP5RvPt4JslVRNAA9gNNjY0iVSTO39bT+Pi8I9d9d2HJHHhU4FH/3YHBZiOKDnotHJY 9j1UCv5lMSkyrlax4o6SuVE1zVCWmq7e+XhxLPFRCU1/1uxnm74m7Pz22f/T/5ukhnoE Al1w== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=Pzr8fsuDL5gmbBOXlrOy4ZH3rjcklaDKzoIttRIVi68=; b=IHsC+c+qjeh9AKVXjFNuOixEVrOCcqxtexEUGtheQ6qVn9NqcNnQe4SIwbWGbNq9hu remZD6C+FDja1Pq0P0eFcq4NFEaOBLIuBwUX7bB0VwPTPnXcR3uLs9tIBBqezQogoOj6 Xh6x5/VSRgjnP50k3ZXH8UZpy99ai5taslMExOHJrNOUOzUuqjR7mQ0iY0E7vy8O4aKp AFDDKScIfNBoLhClq/XK2AXka0K4N4uDfUloHg8tOlbaFzaazag8+yLNYz0g9Io6/DYw zdTHaVNriUHWM5uGkKtvv2rDcHO8QT9G5XZFuifbbEfOLcHilZfQvuYo+vml+LSfHqD1 GcFQ== X-Gm-Message-State: AKaTC03yM7/8Eboybqa9PVFgyl/r7+P++OqMF6ECi0CDwHCtKOEnlMDrUBdS36dphswELtNr X-Received: by 10.28.49.193 with SMTP id x184mr32140488wmx.44.1480605465787; Thu, 01 Dec 2016 07:17:45 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id l2sm779196wji.7.2016.12.01.07.17.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 07:17:45 -0800 (PST) From: Thomas Monjalon To: Neil Horman Cc: Bruce Richardson , dev@dpdk.org, Hemant Agrawal , Jerin Jacob , stable@dpdk.org Date: Thu, 01 Dec 2016 16:17:44 +0100 Message-ID: <2826296.pI5ECjk531@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20161121101133.GC16124@bricha3-MOBL3.ger.corp.intel.com> References: <1479494872-9302-1-git-send-email-nhorman@tuxdriver.com> <20161121101133.GC16124@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] pmdinfogen: Fix pmdinfogen to select proper endianess on cross-compile 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: Thu, 01 Dec 2016 15:17:46 -0000 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 > > CC: Hemant Agrawal > > CC: Jerin Jacob > > CC: Bruce Richardson > > CC: Thomas Monjalon > > --- > > buildtools/pmdinfogen/pmdinfogen.h | 10 +++++++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > > Compiles fine on FreeBSD with clang. > > Tested-by: Bruce Richardson Fixed "endianness" typo, headline, added Fixes:, CC: stable@dpdk.org and removed a trailing whitespace, then applied, thanks