DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	DPDK Dev List <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ether: mark ethernet addresses as being 2-byte aligned
Date: Mon, 1 Jul 2019 15:28:38 +0100	[thread overview]
Message-ID: <20190701142837.GA386@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20190701141430.ahi4z37na6mt37j2@platinum>

On Mon, Jul 01, 2019 at 04:14:30PM +0200, Olivier Matz wrote:
> Hi Bruce,
> 
> On Mon, Jul 01, 2019 at 02:38:43PM +0100, Bruce Richardson wrote:
> > On Mon, Jul 01, 2019 at 03:11:12PM +0200, Olivier Matz wrote:
> > > Hi Bruce,
> > > 
> > > On Thu, May 16, 2019 at 04:54:57PM +0100, Bruce Richardson wrote:
> > > > When including the rte_ether.h header in applications with warnings
> > > > enabled, a warning was given because of the assumption of 2-byte
> > > > alignment of ethernet addresses when processing them.
> > > > 
> > > > .../include/rte_ether.h:149:2: warning: converting a packed ‘const
> > > > struct ether_addr’ pointer (alignment 1) to a ‘unaligned_uint16_t’
> > > > {aka ‘const short unsigned int’} pointer (alignment 2) may result
> > > > in an unaligned pointer value [-Waddress-of-packed-member] 149 |
> > > > const unaligned_uint16_t *ea_words = (const unaligned_uint16_t
> > > > *)ea; |  ^~~~~
> > > > 
> > > > Since ethernet addresses should always be aligned on a two-byte
> > > > boundary,
> > > 
> > > I'm a bit reserved about this last assumption. The ethernet address
> > > structure may be used in a private structure, whose alignment is 1.
> > > Are we sure that there is no (funny) protocol that carries unaligned
> > > ethernet addresses?
> > > 
> > > Shouldn't we change the definition of unaligned_uint16_t instead?  Or
> > > change the rte_is_broadcast_ether_addr() function?
> > > 
> > 
> > We could, but I believe the correct behaviour is to make the addresses
> > always 2-byte aligned, unless someone actually has a real-world case
> > where there is a protocol that doesn't have the data 2-byte aligned.
> 
> Maybe you missed that part of my previous answer, I'm copy it again here:
> 
>   > Although this is an ABI break, the network structures are all being
>   > renamed in this release, and a deprecation notice was previously
>   > posted for it.
> 
>   Yes, but the network renaming is identified in the release note as an
>   API break, not an ABI break.
> 
> I thought we agreed to limit ABI breakages to cases where there is no
> other solution. Here, this is surely a "small" ABI breakage, but I
> suppose there is a way to do differently.
> 
> If we really want to do that way, it's better to announce it as an ABI
> break.
>
At this stage, I'm ok with pushing this to 19.11 to follow the official
deprecation process. 

  reply	other threads:[~2019-07-01 14:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 15:54 Bruce Richardson
2019-05-16 18:04 ` Kevin Traynor
2019-05-16 20:38   ` Bruce Richardson
2019-07-01 13:11 ` Olivier Matz
2019-07-01 13:38   ` Bruce Richardson
2019-07-01 14:14     ` Olivier Matz
2019-07-01 14:28       ` Bruce Richardson [this message]
     [not found] ` <1e5856a8-108b-1f0c-6ce7-b7c9eafac658@sitilge.id.lv>
2020-02-05 13:45   ` Bruce Richardson
2020-02-09 19:32     ` Martins Eglitis

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=20190701142837.GA386@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=stephen@networkplumber.org \
    /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).