From patchwork Mon Aug 20 03:54:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 178647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 947B52C00AC for ; Mon, 20 Aug 2012 13:55:19 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T3J4w-0005DN-5T; Mon, 20 Aug 2012 03:55:02 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1T3J4t-0005Ck-9P for kernel-team@lists.ubuntu.com; Mon, 20 Aug 2012 03:54:59 +0000 Received: from 112-104-33-85.adsl.dynamic.seed.net.tw ([112.104.33.85] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1T3J4y-00080q-KH; Mon, 20 Aug 2012 03:55:05 +0000 From: "Jesse Sung" To: kernel-team@lists.ubuntu.com Subject: [Precise][PATCH 3/5] be2net: Fix Endian Date: Mon, 20 Aug 2012 11:54:42 +0800 Message-Id: <39b945b9b996b212370751b1f02f65ff4fff129c.1345433485.git.jesse.sung@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <349024d7fa11333093d09a518dcbbc371c296700.1345433485.git.jesse.sung@canonical.com> References: <349024d7fa11333093d09a518dcbbc371c296700.1345433485.git.jesse.sung@canonical.com> In-Reply-To: <349024d7fa11333093d09a518dcbbc371c296700.1345433485.git.jesse.sung@canonical.com> References: <349024d7fa11333093d09a518dcbbc371c296700.1345433485.git.jesse.sung@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Li RongQing BugLink: https://launchpad.net/bugs/1035348 ETH_P_IP is host Endian, skb->protocol is big Endian, when compare them, we should change ETH_P_IP from host endian to big endian, htons, not ntohs. CC: Somnath Kotur Signed-off-by: Li RongQing Acked-by: Somnath Kotur Signed-off-by: David S. Miller (cherry picked from commit e8efcec5394cbf7ae67ccb137cb1a45ae3e6f6c8) Signed-off-by: Wen-chien Jesse Sung --- drivers/net/ethernet/emulex/benet/be.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index a244f2f..2a64de3 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -518,7 +518,7 @@ static inline void be_check_sriov_fn_type(struct be_adapter *adapter) static inline bool is_ipv4_pkt(struct sk_buff *skb) { - return skb->protocol == ntohs(ETH_P_IP) && ip_hdr(skb)->version == 4; + return skb->protocol == htons(ETH_P_IP) && ip_hdr(skb)->version == 4; } static inline void be_vf_eth_addr_generate(struct be_adapter *adapter, u8 *mac)