From patchwork Mon Mar 19 17:30:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10293517 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 4FFC7602C2 for ; Mon, 19 Mar 2018 17:31:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EBD82949E for ; Mon, 19 Mar 2018 17:31:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D7A5294AC; Mon, 19 Mar 2018 17:31:02 +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 1B838294AD for ; Mon, 19 Mar 2018 17:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966217AbeCSRa6 (ORCPT ); Mon, 19 Mar 2018 13:30:58 -0400 Received: from mail-db5eur01on0062.outbound.protection.outlook.com ([104.47.2.62]:45696 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966071AbeCSRax (ORCPT ); Mon, 19 Mar 2018 13:30:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RdGc3oQVyh2RTqML9qd/VCSECTbwOQiUk16/GAGLlj4=; b=WUts/kMMut07fHNkhr3mhFDKbptiuNSuBv+05kPmZkkF3Wg0gcSG4x2dtrM4opYTmAJHD3WLmsV4IxG79+BN5D2LcfW9tX8ZrKOkaEQkdjwctasxLvBGfi2t9Bq2QY1VwbzOTKeluIkj5Uvy9XKNb+7PHDGxhpk1PfL1UUwJJpY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Received: from mlx.ziepe.ca (174.3.196.123) by DB7PR05MB4460.eurprd05.prod.outlook.com (2603:10a6:5:1b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Mon, 19 Mar 2018 17:30:50 +0000 Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1exycN-0006Iy-LL; Mon, 19 Mar 2018 11:30:43 -0600 Date: Mon, 19 Mar 2018 11:30:43 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org, Devesh Sharma , Selvin Xavier Subject: [PATCH] RDMA/ocrdma: Fix structure layout for ocrdma_alloc_pd Message-ID: <20180319173043.GA24189@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [174.3.196.123] X-ClientProxiedBy: VI1PR08CA0121.eurprd08.prod.outlook.com (2603:10a6:800:d4::23) To DB7PR05MB4460.eurprd05.prod.outlook.com (2603:10a6:5:1b::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d295ff1a-eb70-4173-a5ac-08d58dbf28a2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4460; X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4460; 3:h150tmgtZipMi+TigPy+5Kl9h9qH6KGVl0Uf1b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7JZRBsWCOaUqRwvH9/LloAV7UGCfysMBag3ep3ntAIbI5aDxzljlGdVoEjATjEslrdHoqwrtDrfNb+IwVtOrDvDaylH6fAMEdXm6d6T+ok1RqEe/cD/iuuRCjQk7IaHknvDMmGarTfXmbbQRgk/NYSrWpIdphr3V6wcrtPcCHSJLEv+UWzWOdnesUANYNpXc5rBC3N3/sdfLPy0YgjjZyv3uMU9BDXvt4Nms+38MKLsLVs/PtNujFUWZV8vbos/scqVFHVPYEriiJQpy4QrHM5Q9UsNKmSaEvpzQnozAKeyjyekh; 4:mdQmddpzdeJzio0mUrBticNO2IAEq0UDa86VOc+uHjBEyYp8r65GISyD/A0N3CLDGHIU7852XOgNB2pl6ljUJuvOvK4nbn+g1UHIHt/KPhCRqA1/fuyjRjUM6wjBYQ7ped83CzVegGMcQxpszngTIQLAevTXHshh1qZtfCcTH9Ft+wNGMZtaIIaGNfMKhdXWtsCBdHAysbjH0WVHnHgkgFkJycMBX6rDBc0Ig5tvWTc3nA2wraq8C9PPDW3Fbz34Jw5m9+0uOYm1pw6pDfzrqQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231221)(944501244)(52105095)(10201501046)(6055026)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:DB7PR05MB4460; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4460; X-Forefront-PRVS: 06167FAD59 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(39380400002)(376002)(346002)(199004)(189003)(305945005)(33656002)(69596002)(9686003)(8936002)(3846002)(6116002)(386003)(106356001)(316002)(2906002)(478600001)(33896004)(57986006)(7736002)(52116002)(81156014)(105586002)(36756003)(8676002)(110136005)(81166006)(83796002)(23726003)(1076002)(26005)(86362001)(9746002)(9786002)(122856001)(68736007)(50466002)(1857600001)(16586007)(5660300001)(58126008)(53936002)(47776003)(46656002)(66066001)(97736004)(186003)(18370500001)(24400500001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4460; H:mlx.ziepe.ca; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB7PR05MB4460; 23:bFPYf6kBvTdtP1PbYdHVNiSGQFGCaeRCCWW5YdK9v?= =?us-ascii?Q?FoF88KeEcdayCMTw2K67E7qXYaVH/ojXTVwdZD6/4oBSTvaKE6wLLztkCh6F?= =?us-ascii?Q?dNR8LY7JVij4APm/nUZxVJUHEYbSX7tzPornVwuYiR5lr8cseJsBqcJnDh5d?= =?us-ascii?Q?FPAGbDomy1Utw/RHwtlCDVg9htLn6c5Mh3voMENi96g48RsTM8taWPpgCJ3J?= =?us-ascii?Q?ag5dGlVpKlJfI6p5xQ7Bvj4h1YNDRl2GwX5zb0EIxqOVp1spJDDJSXJfs5d+?= =?us-ascii?Q?XtBEd0XRtg8dSyjrBodxhBgYn+V/CCEes8A4mQtJeb4JUGEi8cUrvH2uuFaB?= =?us-ascii?Q?tLv3qSKul5sPU8bhImRedpUvy/6Ywk/hu4zjenbDLzgvRdEth2zC34oJdLxo?= =?us-ascii?Q?d/l67IY3m1q1KV330RIlP/wjZJdISn6SCOPrIOugG4MEa01okDikRX95Io/M?= =?us-ascii?Q?fMpsItJLSADOiCodLJwK1Hs1PXqn809IfIH07Epnmf9a4McxjYTTwY1mdxt4?= =?us-ascii?Q?Bvbw/nFsEb2pnQNhVTQDvGxTo3FjtfLswqxYfsHL9831o/iawp0JkD1xqF5z?= =?us-ascii?Q?eDycI9F1QwX8+r1lzAxWme92myu/1NY60vkYL2FXqoV0rGKcqZucRPG8u4Bf?= =?us-ascii?Q?LuFhoqZWPsACSWaAp2JNM3i/WHawpUlazgAeiGUA6Y5pYIwWV/r9F4VkJwh+?= =?us-ascii?Q?Fo60hNPFdTfRgt7D4ouhdsIXzNZiGw9Yf2Ceb4D2b3f6uKAWxs0fHPKKlqp/?= =?us-ascii?Q?/T/RxnpD+h3VW5nMOsGoZ1IWTii4Bu5FkObdAJ+nnoA+HPYqoxwoMKYWlj6Q?= =?us-ascii?Q?96Gep+PbYh46fIST9KGly2fJcBNqVvj+d/fm9Ha0LZYOhqDpp/JuVriUYz8p?= =?us-ascii?Q?8Gv4jw1zb4NpcNp0T+nQRNu/QR3NlZKwn6SZKC3TTZy799vWXaXZTFMsR8yO?= =?us-ascii?Q?2+/BG7+GfnuNC6GnREGMvgOLvy29lk77WMFp7laxYSiDpPF2qON+m5lTO9SA?= =?us-ascii?Q?QjDqdOUwhuzvwetBlMp1B9/zUiWV5gRQEZbTyMzfDV8TIC+Mao/h0G8Ht+xQ?= =?us-ascii?Q?BUYKLTJl37iQP34OVhFl76/fgsxN9Rim/IuIaI1BrMAwShrjtOQWfYipMHX2?= =?us-ascii?Q?xu0Dd3Xe3UlLBc/NW3wpiYrZUng7KQmzIOJjtutJf15UsozMXMVjfhfoY+wX?= =?us-ascii?Q?cehwdY+8EPMT35QnjVPf0EU7oBgjsv98TSlO41cXf4lwOtBYgKbLE2gJQ=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: 5az8ZUqn7d7xWB8DEAk9M5sjZJyFHt4YyqoIIosuZdqyzjaIQg+jNG80jdsYM/tACv9xfPuCGTv09OHMN5TI7+X7Z2tLU41W/hc/d/TFuVIWaRh/AW3qG8lGqufHvdv5iob/dQX74shdUPHWawC7vHyrhThIUEOFXFeIoDnfNEM74TgzWrahTBrScwBmB91T X-Microsoft-Exchange-Diagnostics: 1; DB7PR05MB4460; 6:mytRCnNTfZSEceaS0UyqrhU7FpESS0Zomjdm+1aNnCngy1rZngmhtHZqejkCq6+hMf460nj7mZfX8j0B0omNxeHICWgfI2y4030iDEmtGUrKIKNdXEASnwbOyKw0dPhfWTFkGuuzY/KyWnKGhTG/09IxeQt+6TeXTciA+3yosDEifWqzaXOyBIhxw6l+CIn3RiaZnvx6oUT/Jfzq8ME5MeQVFhMuR/jj+LBoFtP9pv5lvOg/SCviHZ2/v1G7qmbe/v6REApxT6gr8xvAEseRkyVk9/Ix7/73b0IKPjOQmeD8pTUWO+jJy4WMlZaZOhkfXSOn+KJKQghAqP1fDG3CjASJnBT/GtXsY4j0dHyqjZc=; 5:4nUTGd493TvDubQecUASYxsA2W/ZtIEqxbEGZ3j7HHISnfkSqrN3x8J7iXair6pBhKAA6tnW8eK1avsEbOuP84kznsKiUWOwXElTlt2INMXOpWvWqPU0xGRyNIPOOSUGk7T35ZNhHCORPMLu+J4jBj+1TJZMtimIqaR5BTNemH8=; 24:GuIFiXd7QI8CKkGiSRzTYY5FfjJtdYMmVVLFkyItx01gngDSS68/KpiHf87GTTwRPR52F2319c/TiXrRrGD+5KBNbQitq2oeVTPeUiIYozg=; 7:qhZqxmo92N4jzPlcoxqxfkFAkMXMWM1/aWwOlAPpa1TXTLtA/CnOaY/kEsecpzlvQGZEw0Aly8yXfgbJbV8/TYyT9T7Upw0LJWBarV9V2daWvDmiKgUa/vx1IxpoVDGDLiWMicT+djKAsSGn9dtgAJRp0WHGSwVyyjLbYghFbdm1OXgVRQe4k9atkxS6P6FQ3aR7uCP6B6+JYYrv8tx5gMRvND5x4rXQKyCw6kKxpcd2p0IZfOgJcWIreqjD0Ps5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2018 17:30:50.0779 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d295ff1a-eb70-4173-a5ac-08d58dbf28a2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4460 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 The udata's for alloc_pd cannot contain u64s due to alignment constraints. Switch the two never-used u64's to arrays of u32 to reduce the required struct alignment to 4 bytes. These reserved fields are totally unnecessary, never written and never read. Signed-off-by: Jason Gunthorpe --- include/uapi/rdma/ocrdma-abi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/rdma/ocrdma-abi.h b/include/uapi/rdma/ocrdma-abi.h index e0475d59cdf00d..32ef8670583a32 100644 --- a/include/uapi/rdma/ocrdma-abi.h +++ b/include/uapi/rdma/ocrdma-abi.h @@ -65,7 +65,7 @@ struct ocrdma_alloc_ucontext_resp { }; struct ocrdma_alloc_pd_ureq { - __u64 rsvd1; + __u32 rsvd[2]; }; struct ocrdma_alloc_pd_uresp { @@ -73,7 +73,7 @@ struct ocrdma_alloc_pd_uresp { __u32 dpp_enabled; __u32 dpp_page_addr_hi; __u32 dpp_page_addr_lo; - __u64 rsvd1; + __u32 rsvd[2]; }; struct ocrdma_create_cq_ureq {