From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=G++9feEc8vNwjVtpAyWhwnCLlkfFxjrQzyRotnqbxOk=; b=QM7uz8QexOSopNdc88dBWxOLBBN8Be2UVor+FKwDDsWVzYYWJ76Vbu5Y065kER6B60 SpNZPHFVJsEQbURMUOIyG5Pzmw9BTZa4ncUpGlJZlzo4uCj2XeD6n8GMrffZ6ZbDpClh ge3x42zqGf3rEVEFX3dpVy1Qbks0aVvLuBGnAZ68FrHsgcW7rZDbLfOc/bY+3Hh/8vr5 Aq5V87pn8kPrxSZr6ar/VBP75ZTtMTzdAvjs+SCbkWjwRfJnubOG4o5l/oF4JsoskiD9 bd2wbtJCwxb3uajBe7RQeskLg4mJCNwSPRjd07y6HSNqlpsD8bZY4YXReJk1ElDfozjZ BPEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=G++9feEc8vNwjVtpAyWhwnCLlkfFxjrQzyRotnqbxOk=; b=Ns14ozsfIs/VwunKSdsVjFxVU9ymLaiNaqqG38zN7yFu/pPmumc2VyGFETW75I9S+J Q19yjrZjBxsCNdEMKQOYqrZHgwRoVORFSKyE2CmIiIqWMn4xMkazzmIsrhcKTPmCR2A5 XBvrDOZELGvvLEipahPigo7pW32GJ7UTjGKTpaaGLU5FmlqHZZbCY85xHMmGMGIccDtp FnXSbG47zNRWQyR2Rk6CyFLc+hfEFx55Js6I82JoWjP6AIyIXmHp3PD45dlc4+TGrLqw y1dSn7lb3ef070UvBNDD0H697+JUmCAo2wQP+LZHAquK0dbqg5paXVprO0UgD2y7NXvg VoPA== X-Gm-Message-State: ALoCoQmr+H+XQFZ3nBZM59jsJXiKjvmVptkF8GVOkrWUZwaPiP47in/YIKLbhkBrK3J3wIgUl40p X-Received: by 10.194.250.39 with SMTP id yz7mr174138wjc.92.1449012947103; Tue, 01 Dec 2015 15:35:47 -0800 (PST) Received: from xps13.localnet ([93.158.53.139]) by smtp.gmail.com with ESMTPSA id ej10sm140354wjd.32.2015.12.01.15.35.45 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Dec 2015 15:35:46 -0800 (PST) From: Thomas Monjalon To: Stephen Hemminger , Chas Williams <3chas3@gmail.com> Date: Wed, 02 Dec 2015 00:34:37 +0100 Message-ID: <3362628.iLARgdqr6m@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151201143754.06675ca9@xeon-e3> References: <1446571576-28399-1-git-send-email-3chas3@gmail.com> <20151201143754.06675ca9@xeon-e3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 23:35:47 -0000 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.