From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stephen@networkplumber.org>
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 <dev@dpdk.org>; Tue,  1 Dec 2015 23:38:07 +0100 (CET)
Received: by padhx2 with SMTP id hx2so18835039pad.1
 for <dev@dpdk.org>; Tue, 01 Dec 2015 14:38:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-type:content-transfer-encoding;
 bh=Ii3iifzInxspCNbLGkPvPWZlAnre/g3XIPTm4gdpCZ4=;
 b=AZiX6RS5bIaW6ayz5XfgPt0RXAt8ApoPltVPdMRhDsIkGcyZccmfvkzFdVUPYAEphl
 b8Lbw8d7LxhLf7NsbjvXpn2TGZgOkPrrwR8psskoU05G0UdR2gmumHE7boSWQqZP5t+0
 hkgauCUhv3JAWfywMGBKTndEvPiPJ2H8TzlHT/emka2SnBbTc2eveyWuj22sJXErUO/U
 Bk3Bk8Yf6qSCHz+sRfVJSUBeYZmM6BHMUxxHiF2SW7Vi+HN5mZkqB+PHMiN83qdF2zHr
 B/rs4cAaHpUt928dkikpewxxDTJhE2iXmh25evQznURMRA94RAeIn9wbZh3FkiKOOobL
 GeNA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-type:content-transfer-encoding;
 bh=Ii3iifzInxspCNbLGkPvPWZlAnre/g3XIPTm4gdpCZ4=;
 b=cB8/t5zjepmmtI8eEznR3PWpMSSJrFhmoJeTYb7p2ZbzeMbav+6FoNoAINVPM8l4mU
 Ls19rznPovjI1bMyiSCA9Ki6EFWaMzxJ6gMJsOi/yKBzSeYLN4sc1FthclIOQUHYWFVT
 2iPVz4l0ICSQEVeh62E2gqOwz4BeztszLBhg6cSO0fimGXw6cft/K5FqjlhR09sFBlmz
 iv+qIrsyRz8UK2k/0dn+Ch5N8h2yLrVwRkohJ5jeSvy0BKgU2SzUkb30iiNCauuVeZM4
 4dbMJ012ptAmqHwizwnC2o18KVPsrOGgQE7zDokwEeln/cL6hP4NMoUsUTrgRpKsOn9W
 iEyw==
X-Gm-Message-State: ALoCoQnJtHXmEbYsGGW/Tfi3zZP9tnYZ3elwDpjIYiMBI+/qvmE0J1l31/UTlbThFhmereU2Xcdv
X-Received: by 10.98.67.207 with SMTP id l76mr84006968pfi.59.1449009486828;
 Tue, 01 Dec 2015 14:38:06 -0800 (PST)
Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net.
 [50.53.82.155])
 by smtp.gmail.com with ESMTPSA id n6sm5492217pap.24.2015.12.01.14.38.06
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 01 Dec 2015 14:38:06 -0800 (PST)
Date: Tue, 1 Dec 2015 14:37:54 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Harish Patil <harish.patil@qlogic.com>
Message-ID: <20151201143754.06675ca9@xeon-e3>
In-Reply-To: <D283389F.103FAE%harish.patil@qlogic.com>
References: <1446571576-28399-1-git-send-email-3chas3@gmail.com>
 <7399538.hXbaSMXxgP@xps13>
 <D283389F.103FAE%harish.patil@qlogic.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] bnx2x: tx_start_bd->vlan_or_ethertype is le16
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2015 22:38:07 -0000

On Tue, 1 Dec 2015 21:53:59 +0000
Harish Patil <harish.patil@qlogic.com> 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 <harish.patil@qlogic.com>
> 
> 
> 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.