From patchwork Mon Jan 2 10:40:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9493335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4037A62AB3 for ; Mon, 2 Jan 2017 10:40:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49D1620008 for ; Mon, 2 Jan 2017 10:40:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CD2F26212; Mon, 2 Jan 2017 10:40:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5B1620008 for ; Mon, 2 Jan 2017 10:40:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932830AbdABKk5 (ORCPT ); Mon, 2 Jan 2017 05:40:57 -0500 Received: from mail-by2nam01on0070.outbound.protection.outlook.com ([104.47.34.70]:51357 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932283AbdABKk4 (ORCPT ); Mon, 2 Jan 2017 05:40:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandisk-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FqyiesamDNUnUWXytDPnhZbLNbLL+/B2Yn7iuIzdghc=; b=gJdwdwU8tiH2ORqIsRjljQxNquoWwcj65Fg0DEy/XTpE4cnSVHgI2WrvdEKGdYnn2er8nuh05s4rMoOeKY1cjM+SOZgf+1GVxQq8lCBKm+w242W/fNnPYV8EzyI97e13Do2RETHp++hufBLtuZKA8I2OfojG89309zJLedXa7OE= Received: from BLUPR02CA036.namprd02.prod.outlook.com (10.160.23.154) by BL2PR02MB354.namprd02.prod.outlook.com (10.141.91.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Mon, 2 Jan 2017 10:40:52 +0000 Received: from BY2FFO11FD035.protection.gbl (2a01:111:f400:7c0c::103) by BLUPR02CA036.outlook.office365.com (2a01:111:e400:8ad::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10 via Frontend Transport; Mon, 2 Jan 2017 10:40:52 +0000 Authentication-Results: spf=pass (sender IP is 74.221.232.54) smtp.mailfrom=sandisk.com; dell.com; dkim=none (message not signed) header.d=none;dell.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 74.221.232.54 as permitted sender) receiver=protection.outlook.com; client-ip=74.221.232.54; helo=sacsmgep14.sandisk.com; Received: from sacsmgep14.sandisk.com (74.221.232.54) by BY2FFO11FD035.mail.protection.outlook.com (10.1.14.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Mon, 2 Jan 2017 10:40:51 +0000 X-AuditID: ac1c2133-ba3ff70000000ec6-4b-586aa92991ba Received: from SACHUBIP01.sdcorp.global.sandisk.com (Unknown_Domain [172.28.1.254]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id EF.47.03782.929AA685; Mon, 2 Jan 2017 11:25:30 -0800 (PST) Received: from SACCASIP04.sdcorp.global.sandisk.com (10.181.10.113) by SACHUBIP01.sdcorp.global.sandisk.com (10.181.10.103) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 2 Jan 2017 02:40:51 -0800 Received: from ULS-OP-MBXIP03.sdcorp.global.sandisk.com ([fe80::f9ec:1e1b:1439:62d8]) by SACCASIP04.sdcorp.global.sandisk.com ([::1]) with mapi id 14.03.0319.002; Mon, 2 Jan 2017 02:40:50 -0800 From: Bart Van Assche To: "dledford@redhat.com" CC: "andrew.boyer@dell.com" , "monis@mellanox.com" , "linux-rdma@vger.kernel.org" Subject: [PATCH 06/15] IB/rxe: Enable type checking on SKB_TO_PKT() and PKT_TO_SKB() arguments Thread-Topic: [PATCH 06/15] IB/rxe: Enable type checking on SKB_TO_PKT() and PKT_TO_SKB() arguments Thread-Index: AQHSZOSumNvx/Nx/Z0myHqlS+3yk7w== Date: Mon, 2 Jan 2017 10:40:49 +0000 Message-ID: <1483353555.3592.24.camel@sandisk.com> References: <1483353316.3592.14.camel@sandisk.com> In-Reply-To: <1483353316.3592.14.camel@sandisk.com> Accept-Language: nl-NL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.28.1.254] Content-ID: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHIsWRmVeSWpSXmKPExsWyRobxn67WyqwIgyPfuCyute9jtXh5/gOr xbNDvSwWG96vYXdg8Zg0cwazx7Pph5k83u+7yubxeZNcAEsUl01Kak5mWWqRvl0CV8bSn7oF h3gqbm3xb2CcwdPFyMkhIWAiceP2d+YuRi4OIYElTBIvZr5gh3DOMUp8XbUNKnOUUeLbzguM IC1sAkYSsyfsYQGxRQT0JQ6tXskIUsQsMJdRYv2dpewgCWGBBIklj3sYIYpSJeb8uALVoCfx ovkKM4jNIqAicXTGfrB6XqChzxadAqsXArJPdj4DszkFjCWOTz8O1MvBwSggK9HymhskzCwg LnHryXwmiBcEJJbsOc8MYYtKvHz8jxXCVpD4vOIfG0grs4CmxPpd+hCtVhL96yaxQtiKElO6 H0JdIChxcuYTFogL1CVO3lnLPIFRYhaSbbMQJs1CMmkWkkmzkExawMi6ilGsODG5ODc9tcDQ RK84MS8lszhbLzk/dxMjOFYVjXcw/tvgfohRgINRiYd3wc3MCCHWxLLiytxDjBIczEoivC3q WRFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeeUP7A4VEkhPLEnNTk0tSC2CyTJxcEo1MG7dweC2 3Sy+yig7nkFZ2qSpuynqg4Sjqmq/RLyvxo2kYKkFJV/vnvWw+jiD52fwyvLJGhmTd834v5Zn 0fJmC5bTgqe3L7KQn7Pu3a9GNoU1AlX2EfNa/jgtW6jbV7KLf8MVoXJPlRNdFZPcyp5x9nAZ 7BDprNpwZoEn6+R0w8ndpff+qrQ/VWIpzkg01GIuKk4EAO9Cr73RAgAA X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:74.221.232.54; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39410400002)(39450400003)(39860400002)(39850400002)(39840400002)(2980300002)(438002)(189002)(199003)(189998001)(69596002)(47776003)(54906002)(7736002)(2906002)(2950100002)(6916009)(110136003)(5640700003)(54356999)(2270400002)(76176999)(50986999)(106466001)(92566002)(8666007)(106116001)(33646002)(2501003)(2351001)(50466002)(81166006)(1730700003)(4326007)(3846002)(38730400001)(97736004)(8676002)(36756003)(356003)(8936002)(5250100002)(81156014)(6116002)(5660300001)(626004)(68736007)(103116003)(23676002)(305945005)(2900100001)(86362001)(102836003)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR02MB354; H:sacsmgep14.sandisk.com; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD035; 1:x0upJaitH7mRZtTYDDrfMn16V0OyGh1vvXmZlT24eEep/HyY9+lPhzVZXwP8t+K0KeGJHm8n/pxFBS7glcOiLTZus/J0YpMBgw/mKj19YpnrkRo/sLOg4O3+aBQ2pUKoztipEyK+E0V8UfAM6HsRHsGnnC6/KktrCnUrIURqRgm2dm+kEXGsxht9Sd5zH8NTQms+PV5wlw5/apkNWrYdsRMjGyzCAlLXQ+QyRziVVHjcLK9T+Q8zMD06laY2Okjrm5tqnSY6K7jCKfJjelrIyp3p+77d8UNGz84Jpl4EtOYbixOc2OvZPN0mCy05NIg3C6OcQODasbhY4BwnfkQRTqeC0jpOyrKBRoIji0nZG6lwhrvUwqTJJrj0axrdwBvbEiQuGLDscn9IJV3vJoX4c5ArvCZH0jbUI89LhFjp7wQWO6867oR8K7wVWa8mtmvCVXDfPvDbQKpokH4yP3lzCBvr1tBzh67kaAf+1YgHUR4uiRYrdk0TX1+qcmhOLeIIp+HWit24sWc8NC3n1IVQemdAss75l2HSrTbpvCJN0u0IzmkHn53LWy/MZrmWmZazoMTQQJN+W4c18vA7YSfsigW+LKjm7wE+f71EBcQtzp4= X-MS-Office365-Filtering-Correlation-Id: fa18bc33-4630-45b7-f7d0-08d432fbd2a0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:BL2PR02MB354; X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB354; 3:85v5Vhrrunl/QhbqukW8vKaHNaITtpFDrOXVGW8FEfUTu8Kx9Jw1xFW8UsA9cFoi5QEYlw1YMz09fyTcKFsrTSGmOh7EIysw9vnYFswArgxqEPtDHeGQeBOJZkldQ7ugZ6EDTU2BFTYTeUtzFAbOyF+QmVx7LtdeZE3pPFjUaxzXdqvX+bYz8Tkan3VPxK1xZDqTW++Yv9nfhxwXvMya7PxmrsQAIxyz7q0P9Psv3j/zCofZoc7n7me/PB2tV/mtzIpXXFhgkFKxSbFdNnjJmVeCZCfbr9sSFpkczupnkKzXBQRCux1NUIn9rYsryCAepl3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4pnmxh7Xq3e6cOG+lw2KBtvCArFum00ragDw3eoyudhNNC05ELPLPhRFEw+s3hgxNOQgPtJjI/nN+m00xpGnT6rxpZLk5UGI/8YTTMO5GuURx7pMHD3ox5h9TdU5ra2VlLVWnCtuppROXOsD2+8ryE+2FshXCAgqXR+t50xY75nkUrqhlt4N4+0twe/qmemZyqSPcrzJZFt+Yqg4iAw/3XewQ=; 20:YNDjB+n0yN9QXrNfS/OU65i0nXLgXPnh3FiNOWeN2KO1lR/X1CQgq2peSVfgmX5JAntAUJ5JvH3krgk3tUoKN7g5JvsX5fr/Tir3t8C97f8kstq5qL0TrVb4D1GXSn1qtX3onvASA2Qe4i2lPVOafDPMRLRZ1GXxkklBBemfMoCwAYdmAxCoUR+ZI55Ezh+fMA+xQKWBOKy8Zk85CCGPkhmY7nz9DirR/DGXqp09meC30P5AclwroBfAVvRzatU5yxPYzwAI7wbRwKbDs1ai2s+1utZpiS1GYYbNK/K9v4550Gw77DDuOzidkTJ9+X4EvdtxYlTWwPIlSufPmp5yTmeAmn712xvR1Bx9E6xlZN6E6HUH9VQimMljs8zmiye3JnuE5eGOaCiBlHPALiaBJ5GmJYjKH8mOorZLOnkNwJqmuJgrwX4+wXA90QhFOPk/EWuzRAE1+R5fYfa12iNiwtyWLFOfgGLhPhTjTHsq0IhcdO6ASy+odmC1uT8laBay X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(56004941905204)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:BL2PR02MB354; BCL:0; PCL:0; RULEID:; SRVR:BL2PR02MB354; X-Microsoft-Exchange-Diagnostics: 1; BL2PR02MB354; 4:OAuRDS8S0YLfzy4CRyI9ZKy8aW+24aMi43myi1bom4X/fmnVHr64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DuU9SKBEkdERHxH9mhb/Yg0RxJILNOlMdCLaWwkAF7MA== X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2017 10:40:51.7247 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[74.221.232.54]; Helo=[sacsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR02MB354 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Let the compiler check the type of the arguments passed to SKB_TO_PKT() and PKT_TO_SKB(). Signed-off-by: Bart Van Assche Cc: Moni Shoua Cc: Andrew Boyer ---  drivers/infiniband/sw/rxe/rxe_hdr.h | 12 ++++++++++--  1 file changed, 10 insertions(+), 2 deletions(-) --  2.11.0 Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Boyer diff --git a/drivers/infiniband/sw/rxe/rxe_hdr.h b/drivers/infiniband/sw/rxe/rxe_hdr.h index d57b5e956ceb..6cb18406f5b8 100644 --- a/drivers/infiniband/sw/rxe/rxe_hdr.h +++ b/drivers/infiniband/sw/rxe/rxe_hdr.h @@ -53,8 +53,16 @@ struct rxe_pkt_info {  };    /* Macros should be used only for received skb */ -#define SKB_TO_PKT(skb) ((struct rxe_pkt_info *)(skb)->cb) -#define PKT_TO_SKB(pkt) container_of((void *)(pkt), struct sk_buff, cb) +static inline struct rxe_pkt_info *SKB_TO_PKT(struct sk_buff *skb) +{ + BUILD_BUG_ON(sizeof(struct rxe_pkt_info) > sizeof(skb->cb)); + return (void *)skb->cb; +} + +static inline struct sk_buff *PKT_TO_SKB(struct rxe_pkt_info *pkt) +{ + return container_of((void *)pkt, struct sk_buff, cb); +}    /*   * IBA header types and methods