From patchwork Wed Feb 7 23:45:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10206345 X-Patchwork-Delegate: jgg@ziepe.ca 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 89FC46020F for ; Wed, 7 Feb 2018 23:46:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CE78290B6 for ; Wed, 7 Feb 2018 23:46:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71864290F6; Wed, 7 Feb 2018 23:46:04 +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 D7996290B6 for ; Wed, 7 Feb 2018 23:46:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751022AbeBGXqD (ORCPT ); Wed, 7 Feb 2018 18:46:03 -0500 Received: from mail-eopbgr50064.outbound.protection.outlook.com ([40.107.5.64]:35910 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751788AbeBGXqB (ORCPT ); Wed, 7 Feb 2018 18:46:01 -0500 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=ElaFTRE3rBzx+9kaGh9w9RLpJeTPPU1ennuZ8+vbaho=; b=MzER6pH489/jKHasNDvAPmqcFT5OQsliJRp8n3UAv5IK5CbVY8Pei1qTPpbMeVZhmeBO4k8TQAipDKzno4NcZfsH+wk6hd756jxXyvb8lXWYDjgFu3vcY9HPWY+VVoVWIEI5F7Sl0vy3MkxVHyUDsK9abDIjv6ztLZ2FVsnWRE4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Received: from mlx.ziepe.ca (70.74.179.152) by VI1PR0501MB2861.eurprd05.prod.outlook.com (2603:10a6:800:9a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Wed, 7 Feb 2018 23:45:58 +0000 Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1ejZPT-0003lb-T3; Wed, 07 Feb 2018 16:45:51 -0700 Date: Wed, 7 Feb 2018 16:45:51 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org, Mike Marciniszyn , Dennis Dalessandro , Selvin Xavier , Devesh Sharma Subject: [PATCH] RDMA: Do not used __packed in uapi headers Message-ID: <20180207234551.GA14373@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [70.74.179.152] X-ClientProxiedBy: AM5PR0502CA0005.eurprd05.prod.outlook.com (2603:10a6:203:91::15) To VI1PR0501MB2861.eurprd05.prod.outlook.com (2603:10a6:800:9a::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 454abac9-f417-48f7-fff2-08d56e84eff2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:VI1PR0501MB2861; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2861; 3:+4EgQ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igwMyLsfHUapwcCu/vdYfLGwjctwxHyTn4d+/En1uufEowyPAoUfqHE6VBWYwaAHe5TJAQ/bVOiQ4DAwH6VmKdtXapk1+1IczhBhWNmgTqv2BR39h7ODPL3o3NfpVJX/RE5hJX9WvBoTnb7+0tkgJQLkR9aHvm9ntTfAPC1Ni+nxemJmSUdSssA0bQ8p6VQdYzQwOwKRbEsDUT9A1y/VebSq9eflTGTdB+8fVNLeXV8f5CWAJ7xcLJEUbjF7FU1egkhBE9WxcaVVqSKAxBXZF8KMEcol8EymLx20PyZ26+m31kErgEnULbulXJdLQVzJUqxtU4+Ii4rdsku5quSm48xK4/D; 4:oXoLAL9KslPQzZt4fmHE1RbPGPsQzZ//h1MODuPu+w1Km1Cr2s5K2mTl1a830XLkgkSHnLbs/+EQjy6XvjxLlb7+ZHAXN4Ss/eJUusUNwxEYX11PvOPfyCnfhC1+ZTPbCVIrV+HoNICZg9cgr08/ffdvcTLbMC2B/KIKq6W4iIA7KUsrbv+erq817t1BTNjUgrVv8Kdpt1LSO5Wk5sUYpWOmwzf8bpt01ZtAYjE5iid/FXP5H1cjnc52Jb77/UwT3Nx1VoOBVaTpNS++/cb7Ng== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(3231101)(2400082)(944501161)(10201501046)(93006095)(93001095)(6055026)(6041288)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:VI1PR0501MB2861; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2861; X-Forefront-PRVS: 0576145E86 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(346002)(39860400002)(376002)(396003)(189003)(199004)(68736007)(1857600001)(9786002)(26005)(52116002)(122856001)(47776003)(50466002)(105586002)(386003)(33896004)(59450400001)(7736002)(23726003)(106356001)(305945005)(46656002)(83796002)(57986006)(66066001)(1076002)(478600001)(5660300001)(33656002)(2906002)(8936002)(16586007)(36756003)(6116002)(86362001)(9686003)(58126008)(316002)(53936002)(110136005)(81156014)(81166006)(8676002)(69596002)(186003)(83506002)(9746002)(97736004)(3846002)(18370500001)(24400500001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2861; H:mlx.ziepe.ca; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; VI1PR0501MB2861; 23:lDSQXwhlG+TwYu3M25Cg3xqGicPg/u1dg5BGkLn?= =?us-ascii?Q?hhXp9CxVAWNSu9Uhk5/Y3GbqSvW4UjTWyCmGwITU1H/ij3p6PTvmnQ2YlBLe?= =?us-ascii?Q?FNImiCREOi6LWGxX9G7/Z3gwwUOKb/EKTljqxvMx2hhvHE+W7+U0prRPk5gV?= =?us-ascii?Q?ReI4XmOhuG3qo/zwgYAe6BS9GVUGoFoYtRGnBPQft4TrBh+CqD/avnd/d5ar?= =?us-ascii?Q?cY5VB/o2tZO8ukeHNJ9DBkReKMYinFYKmSTXsv3OUB1nXG/NVNauy6K25lqM?= =?us-ascii?Q?ox/w7j2vSC2RNO85hqYXsHzIVnIGo/Ca+aFvlxjhHG5dT1sYb3rqs6zBBaAn?= =?us-ascii?Q?zS+cOnKxrioK5GczqsNMZHdU73DGtjcAbjndh+uB3V1kLOckPXgzM2SJHug6?= =?us-ascii?Q?0ePKMb9S043pKGOEBDjNdWeMYxWX/DqzdcmFE9x6hbK05SLt8n76ijgdO+Vk?= =?us-ascii?Q?WxaUFjEEMK3wngS3kGwOklMMgSpePWfzEHlN/8gI9s0iV5ZAnaQ5KiBFQxDh?= =?us-ascii?Q?Fgio2DEuhIIK11yv0o7L0ITbsNE1bseGq5ve7EnQrwk7UVJyh235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HN6HUM2dlC9+pNS2o6tzYEojwQXOMBwONtSoa7rCIx2FGnpWeXPcNIc9WxRZXGKHMAQov/LlLb3PyvURgq4rgx5e1fyVqxVht/YTHDmy80nxBXw6WXo2PESNFUxBrNX+SJpCNNdL4W902+PV+hdtuEO71m1aEL7KorFo6nNF0/rAMBC3qP8JKH+EJxMj1N5RQ+GyuHk=; 5:um/kJp2ceQvnKw+kyB1O2L1Xv/c1yK4Qpn+rG2x32o9mZxnzA9zhHnm3rL2oz5IzdffpDY4VLIhWeV/Xrukdgol4xu17TnK2yLYt20ewDCSrXpP3A+WBEC8KxHzTxBBGJchxn5WjO836KmcdBrTfwDtdc/liAZwsXjGkS6K28PM=; 24:ECxGfEsE/w9IxnB4TImg6BwioVoZWCpkICQxmP53LbcixmoCKjY0wTsnGmcx3r7s3aBbdM0u0+Pt8kIA5TKXv0w3PZ5yLlODil+I6RUJOK8=; 7:09eoQp1ncPMaDMjdU90nIg1Os4ECNWI4jPqsfuJHog5EcGPXXcDW7zjAlYopmUGDhlPlL3+gsO9NiSXrp01BiNttRSfzVPaZuZlwIMdSN880zlAUiveXKaEtmzrAASrFB0cHk5hxEurKbpyZNqQjnHipGtzWLFvMPA9C6fE51dElksBn6DUjASPDt9eJtmingXg4lUk8JJ/equze9n0B9sFfTNtm8gsUKzSSdReufjlvzfLci2NvEyc7lQhtUXC9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2018 23:45:58.1492 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 454abac9-f417-48f7-fff2-08d56e84eff2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2861 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 __packed is not available in linux/types.h, so we cannot use it in the uapi headers. The construction struct ABC {} __packed; may still compile even if __packed is not defined, however it simply creates a variable called __packed, and doesn't set the alignment. All these uses of packed are on structs that already have aligned members. While use in hfi may indicate the struct itself is unaligned, the use in ocrdma is on a UHW struct which should never be unaligned, so just delete it there. Signed-off-by: Jason Gunthorpe --- include/uapi/rdma/hfi/hfi1_user.h | 6 +++--- include/uapi/rdma/ocrdma-abi.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uapi/rdma/hfi/hfi1_user.h b/include/uapi/rdma/hfi/hfi1_user.h index 791bea2f8297b4..43b46bf6f8bb10 100644 --- a/include/uapi/rdma/hfi/hfi1_user.h +++ b/include/uapi/rdma/hfi/hfi1_user.h @@ -219,7 +219,7 @@ struct sdma_req_info { * in charge of managing its own ring. */ __u16 comp_idx; -} __packed; +} __attribute__((__packed__)); /* * SW KDETH header. @@ -230,7 +230,7 @@ struct hfi1_kdeth_header { __le16 jkey; __le16 hcrc; __le32 swdata[7]; -} __packed; +} __attribute__((__packed__)); /* * Structure describing the headers that User space uses. The @@ -241,7 +241,7 @@ struct hfi1_pkt_header { __be16 lrh[4]; __be32 bth[3]; struct hfi1_kdeth_header kdeth; -} __packed; +} __attribute__((__packed__)); /* diff --git a/include/uapi/rdma/ocrdma-abi.h b/include/uapi/rdma/ocrdma-abi.h index ad64a3cea1cdab..07f85c7e313d84 100644 --- a/include/uapi/rdma/ocrdma-abi.h +++ b/include/uapi/rdma/ocrdma-abi.h @@ -106,7 +106,7 @@ struct ocrdma_create_qp_ureq { __u32 rsvd1; /* pad */ }; -struct ocrdma_create_qp_uresp { +sxtruct ocrdma_create_qp_uresp { __u16 qp_id; __u16 sq_dbid; __u16 rq_dbid; @@ -127,7 +127,7 @@ struct ocrdma_create_qp_uresp { __u32 db_rq_offset; __u32 db_shift; __u64 rsvd[11]; -} __packed; +}; struct ocrdma_create_srq_uresp { __u16 rq_dbid;