From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 0B7AA58EC for ; Thu, 1 Dec 2016 16:17:46 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id f82so251570459wmf.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=R7P2nO7u2T/n1DTR+OInEQBmpgtXUFRoYdOVaBpYN/kQjogY/j+T9oqH9cy2Hz5vP+ 9sbYRj2YHlcUCNewqeRHBXIGufjXz4amwaEjBF12KfabpPKjRHR+OwD6CUvIvctLM0Qa S0rdbt5WLT9l3Dxpie61OvLm6RH+u8lROv4ONeTPZ0Mot5/DEJezizrex9jRB8ykxF9m FZbgJwy/oHZYXRfuIzZmXtA5z9JCgUEiFsMGJnNHhV97K236M14gvYpu/DDuTlf6GM6/ AVwR3hUJvnYdZqDoJJGVLv5MtQ6MwUK0Q40pLBiDQOHjCde+dbiiySun+UmNxXyymthu 5ZSQ== X-Gm-Message-State: AKaTC00OETcQWa52k86tF90Pn6Sw9wMfCmrcnkhZ0ToMguPXui71BDHOupBE6HUA8ZrZQqKQ 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-stable] [PATCH] pmdinfogen: Fix pmdinfogen to select proper endianess on cross-compile X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches 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