DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cyril Chemparathy <cchemparathy@ezchip.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 05/10] eal: add and use unaligned integer types
Date: Mon, 22 Jun 2015 09:47:26 -0700	[thread overview]
Message-ID: <20150622094726.2a751267@cchemparathy-ubuntu> (raw)
In-Reply-To: <4101438.HZvvEl93na@xps13>

On Mon, 22 Jun 2015 11:36:20 +0200
Thomas Monjalon <thomas.monjalon@6wind.com> 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?

  reply	other threads:[~2015-06-22 16:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 17:34 [dpdk-dev] [PATCH v2 00/10] Improve cast alignment for strict aligned machines Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 01/10] mempool: silence -Wcast-align on pointer arithmetic Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 02/10] mbuf: " Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 03/10] ethdev: " Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 04/10] hash: " Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 05/10] eal: add and use unaligned integer types Cyril Chemparathy
2015-06-22  9:36   ` Thomas Monjalon
2015-06-22 16:47     ` Cyril Chemparathy [this message]
2015-06-22 16:56       ` Thomas Monjalon
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 06/10] app/test-pmd: pack simple_gre_hdr Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 07/10] app/test: use struct ether_addr instead of a byte array cast Cyril Chemparathy
2015-06-22  1:56   ` Stephen Hemminger
2015-06-22 16:40     ` Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 08/10] librte_mbuf: Add rte_pktmbuf_mtod_offset() Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 09/10] librte_mbuf: Add transform for rte_pktmbuf_mtod_offset() Cyril Chemparathy
2015-06-19 17:34 ` [dpdk-dev] [PATCH v2 10/10] librte_mbuf: Apply mtod-offset.cocci transform Cyril Chemparathy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150622094726.2a751267@cchemparathy-ubuntu \
    --to=cchemparathy@ezchip.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).