From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 9BF5EC406 for ; Mon, 22 Jun 2015 18:57:16 +0200 (CEST) Received: by wibdq8 with SMTP id dq8so81436271wib.1 for ; Mon, 22 Jun 2015 09:57:16 -0700 (PDT) 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=nsSqCwmFMAe5As8J0EmbJ8EKvyQx31d3wY0/MoQdTp0=; b=UTbqX+mhHz7b2G6Ljmil9PgJgKW8JvNQHXolzSeUEWgN9ylQ+FNkrM2IUxAxTeHs89 dPbKYhKKgcc+yd0tRLPgI4cI7nStSZqk9lkxCPmsg652hv5PP0g4I8Dak7wChbjmUsrX 8dRj7QFC1XV4AUDASPV8XH5FVboAa64GPFmRWJZfJGYCKvjtIY2rFGHNQW5gehMqog35 rNK2PpVjoYWGI522caH9Tv+cn475nGll2+LOsuJ4BKHG9feqEz3YKiXo8+QUcaAv2fHP pSqfICGJis4TWayP0c5xVpmQyHSGT0l9lsB7Nq2NrzyP4ig9T28zbUjN19y5y0Z7qLtO 8Jrg== X-Gm-Message-State: ALoCoQkRddY7x0Zq02B3C3H30PXh4dtAohrEh1Z0QHvZDZWFat5BMffh3kxySCbt333of52t2f+O X-Received: by 10.180.74.210 with SMTP id w18mr33386127wiv.77.1434992236507; Mon, 22 Jun 2015 09:57:16 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id fo13sm18075627wic.0.2015.06.22.09.57.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2015 09:57:15 -0700 (PDT) From: Thomas Monjalon To: Cyril Chemparathy Date: Mon, 22 Jun 2015 18:56:14 +0200 Message-ID: <4657204.d81FlWYDKy@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <20150622094726.2a751267@cchemparathy-ubuntu> References: <1434735293-15469-1-git-send-email-cchemparathy@ezchip.com> <4101438.HZvvEl93na@xps13> <20150622094726.2a751267@cchemparathy-ubuntu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 05/10] eal: add and use unaligned integer types 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: Mon, 22 Jun 2015 16:57:16 -0000 2015-06-22 09:47, Cyril Chemparathy: > On Mon, 22 Jun 2015 11:36:20 +0200 > Thomas Monjalon wrote: > > > 2015-06-19 10:34, Cyril Chemparathy: > > > On machines that are strict on pointer alignment, current code > > > breaks on GCC's -Wcast-align checks on casts from narrower to wider > > > types. This patch introduces new unaligned_uint(16|32|64)_t types, > > > which correctly retain alignment in such cases. > > [...] > > > +#ifdef RTE_ARCH_STRICT_ALIGN > > > +typedef uint64_t unaligned_uint64_t __attribute__ ((aligned(1))); > > > +typedef uint32_t unaligned_uint32_t __attribute__ ((aligned(1))); > > > +typedef uint16_t unaligned_uint16_t __attribute__ ((aligned(1))); > > > +#else > > > +typedef uint64_t unaligned_uint64_t; > > > +typedef uint32_t unaligned_uint32_t; > > > +typedef uint16_t unaligned_uint16_t; > > > +#endif > > > > CONFIG_RTE_ARCH_STRICT_ALIGN should be declared (and disabled) in > > config templates. > > Sure. Will include in v3. I'm assuming this goes into > common_linuxapp and common_bsdapp, allowing specific architectures to > override if necessary. Correct? Yes, thanks