All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Charles (Chas) Williams" <3chas3@gmail.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16
Date: Tue, 01 Dec 2015 18:58:14 -0500	[thread overview]
Message-ID: <1449014294.2645.42.camel@gmail.com> (raw)
In-Reply-To: <3362628.iLARgdqr6m@xps13>

On Wed, 2015-12-02 at 00:34 +0100, Thomas Monjalon wrote:
> 2015-12-01 14:37, Stephen Hemminger:
> > Harish Patil <harish.patil@qlogic.com> wrote:
> > > >2015-11-03 12:26, Chas Williams:  
> > > >> --- a/drivers/net/bnx2x/bnx2x.c
> > > >> +++ b/drivers/net/bnx2x/bnx2x.c
> > > >> -                            tx_start_bd->vlan_or_ethertype = eh->ether_type;
> > > >> +                            tx_start_bd->vlan_or_ethertype
> > > >> +                                = rte_cpu_to_le_16(rte_be_to_cpu_16(eh->ether_type));
> > > 
> > > Minor question - any specific reason to use rte_be_to_cpu_16() on
> > > ether_type alone before converting from native order to le16?
> > 
> > ether_type is in network byte order (big endian)
> > and hardware wants little endian. On x86 the second step is a nop.
> 
> Doesn't it deserve a macro rte_ntole16()?
> It may be in lib/librte_eal/common/include/generic/rte_byteorder.h.

I looked I didn't see anything.  This value, according to the linux
driver, wants to be little endian regardless of the host endian.

  reply	other threads:[~2015-12-01 23:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 17:26 [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16 Chas Williams
2015-11-24 13:42 ` Thomas Monjalon
2015-12-01 21:53   ` Harish Patil
2015-12-01 22:37     ` Stephen Hemminger
2015-12-01 22:47       ` Harish Patil
2015-12-01 23:34       ` Thomas Monjalon
2015-12-01 23:58         ` Charles (Chas) Williams [this message]
2015-12-02  1:04           ` Thomas Monjalon
2015-12-02 10:18             ` Charles (Chas) Williams
2015-12-02 10:44               ` Thomas Monjalon
2015-12-06 21:55     ` Thomas Monjalon

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=1449014294.2645.42.camel@gmail.com \
    --to=3chas3@gmail.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 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.