From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16 Date: Tue, 1 Dec 2015 14:37:54 -0800 Message-ID: <20151201143754.06675ca9@xeon-e3> References: <1446571576-28399-1-git-send-email-3chas3@gmail.com> <7399538.hXbaSMXxgP@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: Harish Patil Return-path: Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by dpdk.org (Postfix) with ESMTP id 893D58D85 for ; Tue, 1 Dec 2015 23:38:07 +0100 (CET) Received: by padhx2 with SMTP id hx2so18835039pad.1 for ; Tue, 01 Dec 2015 14:38:06 -0800 (PST) In-Reply-To: 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" On Tue, 1 Dec 2015 21:53:59 +0000 Harish Patil wrote: > > > >Anyone to review please? > > > >2015-11-03 12:26, Chas Williams: > >> Signed-off-by: Chas Williams <3chas3@gmail.com> > >> --- > >> drivers/net/bnx2x/bnx2x.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c > >> index fed7a06..76444eb 100644 > >> --- a/drivers/net/bnx2x/bnx2x.c > >> +++ b/drivers/net/bnx2x/bnx2x.c > >> @@ -2169,7 +2169,8 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, > >>struct rte_mbuf **m_head, int m_p > >> struct ether_hdr *eh > >> = rte_pktmbuf_mtod(m0, struct ether_hdr *); > >> > >> - 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)); > >> } > >> } > > > > > > Acked-by: Harish Patil > > > 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.