From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 17BA1C7DC for ; Mon, 22 Jun 2015 11:37:22 +0200 (CEST) Received: by wgbhy7 with SMTP id hy7so136132882wgb.2 for ; Mon, 22 Jun 2015 02:37:21 -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=AS1rg6/ad7XiOz8ZyJ6G8mtUQVl7I3LIMqS3kK18c18=; b=U1rUYFQh/kgtZN61Qxd4tjeSNVQNoANHj/nmHW0mUw50pUbbhvKE4E/RFE+j0aQYqc saNndRsH+AL7HfIfnQxPV3LtMG77XNN5pSIIywODFE0DV5OIf+OPty6Xj5Nm4F1RNqxr 6OEn6TKScfGMP8AGEWh5IZgFgRFOCQ5kbBkYvhAA/y0ciHM4g+AFOrzhfNq2eeb4daWt akyohAQ9nliIP/mq+uZU9ysRsKUEwkGPCxd3fsyennSMpEoM5Qgcv2ttm/h7UUXoKr5X F47OLxBbpxR71xj0CEX7rTJItUiK4m9Aa2n9F40jitL1seaveGZaNRTsQfLgcH125bBq GxTg== X-Gm-Message-State: ALoCoQnLd9gchKsJ3Tb5c0ROO0qNm+cOKk5weOx8nLAptHIOlkaP2RXnGwCwNmAWMcTafjNrbWrN X-Received: by 10.194.79.73 with SMTP id h9mr48984424wjx.125.1434965841887; Mon, 22 Jun 2015 02:37:21 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id a8sm16333619wic.22.2015.06.22.02.37.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2015 02:37:20 -0700 (PDT) From: Thomas Monjalon To: Cyril Chemparathy Date: Mon, 22 Jun 2015 11:36:20 +0200 Message-ID: <4101438.HZvvEl93na@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1434735293-15469-6-git-send-email-cchemparathy@ezchip.com> References: <1434735293-15469-1-git-send-email-cchemparathy@ezchip.com> <1434735293-15469-6-git-send-email-cchemparathy@ezchip.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 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 09:37:22 -0000 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.