From patchwork Thu May 26 08:18:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tariq Toukan X-Patchwork-Id: 626656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3rFq4W0bgLz9t3w; Thu, 26 May 2016 23:00:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b=rXkT+Cu+; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1b5utT-0001Ix-B4; Thu, 26 May 2016 13:00:07 +0000 Received: from mail-db5eur01on0065.outbound.protection.outlook.com ([104.47.2.65] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1b5qUs-00089X-MV for kernel-team@lists.ubuntu.com; Thu, 26 May 2016 08:18:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=pEI0V0+af5s3yy4rcS2KrLPZlOgBfufZSfIfnPiiogc=; b=rXkT+Cu+hwr79O0tcNM5xQAVU5kN6NYUaeucNaQlRB899JkzgL+pxMTTrg3BGwymnl4Dlqhd7l3Qhm4mShRCaWnuqnFSz/MiVqmqImo/qNuJoTYiSvPnHlx8/jRKXwyeCG+WM5Uc96rlPpls0i0aBHUb8mrIhKK165FXsZmPNEc= Received: from AM4PR05MB1553.eurprd05.prod.outlook.com (10.164.80.11) by VI1PR0501MB2126.eurprd05.prod.outlook.com (10.167.196.18) with Microsoft SMTP Server (TLS) id 15.1.501.7; Thu, 26 May 2016 08:18:25 +0000 Received: from AM4PR05MB1553.eurprd05.prod.outlook.com ([10.164.80.11]) by AM4PR05MB1553.eurprd05.prod.outlook.com ([10.164.80.11]) with mapi id 15.01.0497.022; Thu, 26 May 2016 08:18:24 +0000 From: Tariq Toukan To: Kamal Mostafa , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "kernel-team@lists.ubuntu.com" Subject: RE: [PATCH 3.19.y-ckt 21/40] net/mlx4_en: Fix endianness bug in IPV6 csum calculation Thread-Topic: [PATCH 3.19.y-ckt 21/40] net/mlx4_en: Fix endianness bug in IPV6 csum calculation Thread-Index: AQHRtqtAuJ1iMjj2cESnVf7P5d80lZ/K3y4A Date: Thu, 26 May 2016 08:18:24 +0000 Message-ID: References: <1464197443-20056-1-git-send-email-kamal@canonical.com> <1464197443-20056-22-git-send-email-kamal@canonical.com> In-Reply-To: <1464197443-20056-22-git-send-email-kamal@canonical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: canonical.com; dkim=none (message not signed) header.d=none; canonical.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [193.47.165.251] x-ms-office365-filtering-correlation-id: b8eb6896-6ea1-436e-46db-08d3853e4ef5 x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2126; 5:A2hOaE+l2QYPA4Jyhql551v8QmlUpc9Ku9SPUVajHT674JtYjj4SoF1eJudKJc8PvlcJwlKoyKXS13fJCLmd2Xa5noN6tylpuiYaokOZiolPyWQOUlRf2xv4G82nN4/8t+ePz+NJ+5kquQpXvh8+jw==; 24:pD582ABBrQSyR1ZxyUvQ4+p4mkMp/8nhD0Mh+45t17J+xuyqeFIZXWB+rBDVKpS6DlauuUPC3KkfwPM+ugGKPEnCKPs5MhActyAKPQDJPho=; 7:dhqagY8ojlljC+kRCaMsiuyS4Y98xPDFDrgf+0ks4IhiVFtUQOmvS4uYMuwXk1YVdxFpog1uhR/vkXxupP+YRoTp+1XL5IOZ58+1AW6LkLixXuE7T/cyKwj4HRPbPgcbIFz50tAapNyAFcK3L8dRcuhFZ1VJz+Tt8+TN1PdcICY= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0501MB2126; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(274839183919467)(104084551191319)(198206253151910); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:VI1PR0501MB2126; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2126; x-forefront-prvs: 0954EE4910 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(13464003)(377454003)(2900100001)(5004730100002)(5008740100001)(76576001)(2950100001)(106116001)(189998001)(66066001)(4001430100002)(77096005)(9686002)(107886002)(5001770100001)(2501003)(4326007)(8936002)(10400500002)(50986999)(2906002)(74316001)(1220700001)(81166006)(5003600100002)(19580395003)(8676002)(19580405001)(92566002)(86362001)(33656002)(2201001)(3280700002)(586003)(5002640100001)(54356999)(76176999)(3660700001)(102836003)(3846002)(122556002)(6116002)(87936001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2126; H:AM4PR05MB1553.eurprd05.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2016 08:18:24.6191 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2126 X-Mailman-Approved-At: Thu, 26 May 2016 13:00:02 +0000 Cc: Daniel Jurgens , Or Gerlitz , "David S . Miller" , Eran Ben Elisha X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com Hi Kamal, It's just a nit, but we would like to keep the patches in the same form as in upstream when possible, i.e. without the line-break here. Thanks, Tariq Toukan -----Original Message----- From: Kamal Mostafa [mailto:kamal@canonical.com] Sent: Wednesday, May 25, 2016 8:30 PM To: linux-kernel@vger.kernel.org; stable@vger.kernel.org; kernel-team@lists.ubuntu.com Cc: Daniel Jurgens ; Tariq Toukan ; David S . Miller ; Kamal Mostafa Subject: [PATCH 3.19.y-ckt 21/40] net/mlx4_en: Fix endianness bug in IPV6 csum calculation 3.19.8-ckt22 -stable review patch. If anyone has any objections, please let me know. ---8<------------------------------------------------------------ From: Daniel Jurgens commit 82d69203df634b4dfa765c94f60ce9482bcc44d6 upstream. Use htons instead of unconditionally byte swapping nexthdr. On a little endian systems shifting the byte is correct behavior, but it results in incorrect csums on big endian architectures. Fixes: f8c6455bb04b ('net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE') Signed-off-by: Daniel Jurgens Reviewed-by: Carol Soto Tested-by: Carol Soto Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller Signed-off-by: Kamal Mostafa --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index 37cdc34..1c2790b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -706,7 +706,7 @@ static int get_fixed_ipv6_csum(__wsum hw_checksum, struct sk_buff *skb, if (ipv6h->nexthdr == IPPROTO_FRAGMENT || ipv6h->nexthdr == IPPROTO_HOPOPTS) return -1; - hw_checksum = csum_add(hw_checksum, (__force __wsum)(ipv6h->nexthdr << 8)); + hw_checksum = csum_add(hw_checksum, (__force +__wsum)htons(ipv6h->nexthdr)); csum_pseudo_hdr = csum_partial(&ipv6h->saddr, sizeof(ipv6h->saddr) + sizeof(ipv6h->daddr), 0);