All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] doc: announce API change for rte_ether.h
Date: Mon, 14 Dec 2015 16:41:28 +0100	[thread overview]
Message-ID: <3122170.KpSg9jKaig@xps13> (raw)
In-Reply-To: <20151214153055.GA37304@bricha3-MOBL3>

2015-12-14 15:30, Bruce Richardson:
> On Mon, Dec 14, 2015 at 03:54:06PM +0100, Thomas Monjalon wrote:
> > 2015-12-10 15:27, Stephen Hemminger:
> > > Plan to change to <net/ethernet.h> version of struct ether_addr in
> > > DPDK 2.3. The change in DPDK source is trivial but it will impact
> > > source compatablilty therefore notification is necessary.
> > [...]
> > > +* librte_ether: The structure ether_addr in DPDK will be replaced
> > > +  by using the standard header file <net/ethernet.h>. The structure
> > > +  size will be the same (no ABI impact), but the structure field name
> > > +  will change from addr_bytes[] to ether_addr_octet[].
> > 
> > 
> > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > 
> > Any other votes for this API cleanup?
> > 
> Are the structures and contents of net/ethernet.h the same on both Linux and
> FreeBSD?

Good question. I'm afraid the answer is no.
In FreeBSD, it is ether_addr.octet[].

Linux
-----

struct ether_addr
{
  u_int8_t ether_addr_octet[ETH_ALEN];
} __attribute__ ((__packed__));

struct ether_header
{
  u_int8_t  ether_dhost[ETH_ALEN];  /* destination eth addr */
  u_int8_t  ether_shost[ETH_ALEN];  /* source ether addr */
  u_int16_t ether_type;            /* packet type ID field  */
} __attribute__ ((__packed__));

FreeBSD
-------

struct ether_addr {                                                                                              
  u_char octet[ETHER_ADDR_LEN];
} __packed;

struct ether_header {
  u_char  ether_dhost[ETHER_ADDR_LEN];
  u_char  ether_shost[ETHER_ADDR_LEN];
  u_short ether_type;
} __packed;

  reply	other threads:[~2015-12-14 15:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 23:27 [PATCH] doc: announce API change for rte_ether.h Stephen Hemminger
2015-12-11  9:28 ` Panu Matilainen
2015-12-11 16:33   ` Stephen Hemminger
2015-12-14 14:54 ` Thomas Monjalon
2015-12-14 15:30   ` Bruce Richardson
2015-12-14 15:41     ` Thomas Monjalon [this message]
2015-12-14 16:00       ` Bruce Richardson
2015-12-14 17:30         ` Stephen Hemminger

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=3122170.KpSg9jKaig@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.