From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16 Date: Wed, 02 Dec 2015 00:34:37 +0100 Message-ID: <3362628.iLARgdqr6m@xps13> References: <1446571576-28399-1-git-send-email-3chas3@gmail.com> <20151201143754.06675ca9@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Stephen Hemminger , Chas Williams <3chas3@gmail.com> Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 519D12E81 for ; Wed, 2 Dec 2015 00:35:47 +0100 (CET) Received: by wmuu63 with SMTP id u63so193829732wmu.0 for ; Tue, 01 Dec 2015 15:35:47 -0800 (PST) In-Reply-To: <20151201143754.06675ca9@xeon-e3> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-12-01 14:37, Stephen Hemminger: > Harish Patil 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.