From patchwork Tue Mar 13 22:26:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10281069 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 76E11601A0 for ; Tue, 13 Mar 2018 22:27:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56BDA27F88 for ; Tue, 13 Mar 2018 22:27:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B63228560; Tue, 13 Mar 2018 22:27:56 +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 80A7127F88 for ; Tue, 13 Mar 2018 22:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932205AbeCMW1y (ORCPT ); Tue, 13 Mar 2018 18:27:54 -0400 Received: from mail-eopbgr10043.outbound.protection.outlook.com ([40.107.1.43]:54272 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752944AbeCMW1I (ORCPT ); Tue, 13 Mar 2018 18:27:08 -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=Fxxxtd3ZQ6L4zAIvE8e41KUACXC78kxOBf/d142QfPw=; b=Sc8QEY+IkVM1pWysUsZFMvHQ656zFz1YVOZc/FtwKYcCFD67fcOyvZY/SIqxFkFHUobqVazJEIhxjvkVe/NO7jVp7PXKaAj5scEA7dFK5wbYHkOcSTvQZ+ilYVrITWv6pA4jX7udo77GRnUVEqLbElf7DNVo5rm9PJT23Is5Giw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jgg@mellanox.com; Received: from mlx.ziepe.ca (174.3.196.123) 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.548.13; Tue, 13 Mar 2018 22:27:03 +0000 Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1evsNa-0002rJ-H8; Tue, 13 Mar 2018 16:26:46 -0600 Date: Tue, 13 Mar 2018 16:26:46 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Yishai Hadas Subject: [PATCH] RDMA/mlx4: Move flag constants to uapi header Message-ID: <20180313222646.GA10914@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: MWHPR11CA0020.namprd11.prod.outlook.com (2603:10b6:301:1::30) 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: 67ac886c-2f19-4fca-5eff-08d589318c2d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2861; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2861; 3:zZvEnRI1GgDKadtHJDJerGDmXrrJMKhBbEur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d4JU3Sg1KFt7vs78h4mCMUoJ6dZ2CVaEdCcjv8/qDkjqgloNOgqY7zefb1woiRU+2oKnypN5SczGV4Ro9W5PA1Ib8Do1GaVavxXDggbzUqoMAjeuLBzqKrrpVRG6xchw01+pvF/kf1sT2nDnDLhDPM/zhyLRE9DRKfc3dbvoL07ftX/hrpjbOuJm5z4usSlbYTPys2CMUIbV8zuj7shxGFoz7nRqy10J+BIZog9njDzVHtFSI7xdiivpe6Z4Lo/frdBBDy6CA1dbIQnApcNOnqR/P8J4Cww8hNaeJsoxZygRP+; 4:McXyLQBteub+2R9FpWzw2ndCnCs7B/6i5nkz+hQJWuPod6jRRGc1Z3+3zSlWzQ8IWEgw6ya/EoKWXvZQdSpcdc7PdbmC22q+9icr6SgXsMsZXxdE0CMB8S+zz69qkCvJMOiP7P4cASJZcRPI2sHS0CFt0yE7n273EfulJEz1GHOYlYE6jSp74TFONp+VZo5JViq/McMeG/T1CIwXr06oetaUnKEiogQB+izek+urDShtXKqnCpmQkSoRFZEeAvw3RqKlKKNsueDZyd6y+zhqPQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:VI1PR0501MB2861; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2861; X-Forefront-PRVS: 0610D16BBE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39380400002)(366004)(39860400002)(189003)(199004)(26005)(69596002)(36756003)(106356001)(81156014)(3846002)(66066001)(5660300001)(68736007)(7736002)(81166006)(305945005)(86362001)(8936002)(105586002)(8676002)(9746002)(9786002)(6116002)(33656002)(478600001)(57986006)(83796002)(46656002)(47776003)(107886003)(386003)(186003)(16586007)(23726003)(50466002)(1076002)(97736004)(2351001)(4326008)(2361001)(9686003)(58126008)(122856001)(1857600001)(316002)(33896004)(52116002)(2906002)(53936002)(6916009)(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:xIALr2tfE2XawBjiorrHXCMDtdVjVKDahd81VcU?= =?us-ascii?Q?zR8Xo1AO1yu1VNn0P/XK+Hirfed1mm2pvipR6Xl4DoLd0tRTHJxEpUidyEuh?= =?us-ascii?Q?HxvQXva2ZWCS25yzbUPK87zf0WDKJT3HOc3Yd7U8XBc69n+DKHAStjKPVF81?= =?us-ascii?Q?BGwk5GNR9dDCCeCsEhXSUEnqwWWxkN8tPQWC7m1diSZhzNR6zZgC+/ZnzoB3?= =?us-ascii?Q?Mg9CNkgHJbCGh8sTwvV/FFrCtCAf+MxD3swtvr6RZPJuZIKdkX5O2XYy1oU7?= =?us-ascii?Q?BJsOFFdr+4YreXKwb4xrgO6FZka6fJgug2IyUsssBEfcqyK5XptlGLMsmGdt?= =?us-ascii?Q?s4Pn36PNvMl1g2lA6hufqRItZRQHCpSH4WAqK2iNJpkr0NukQzeBi7y1/FWj?= =?us-ascii?Q?yR+AFPeWkhN6Ug8MVW8IjE8agkWXIxGBfPSgQj1KkRjk228+vcjBr8RffccW?= =?us-ascii?Q?whdzVXqUSrh4CFwMCkC62YTHzVWeLR1Q6naEjYb++x6Yw4tOZWMbwgropqyD?= =?us-ascii?Q?5Ii9O/X5YfW+ODVXaOg5KarikGP6nHGKsSm4jO62HgYPUIFxM75ucRJNRxYz?= =?us-ascii?Q?vXiYYJPqkLhKpM4ieN8z4Dqeotx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4ynJPWTCxoRaawQ0yC06uw9Y X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2861; 6:3wsUfpQse8OQplr47eYLlwFbqfjnXmGzUTWwa862QFCMXlb6oy8iJONCccf/qr9odYVCzLRbOTtqbBOjLIzszfI+2KMQaLr1xWtr1okmYAIwY5bKr6iAGwMIPob89JKNVX+RkCLGEdkcNADEE7aROcLPRfVdFrThtBk3KqV1fYUD4jiWBiSE/CzNrAYDgIIeJMh9nkov4C9G0oTTxtJHs91XgG7I0nR8vMoznfaj10EXw7z34ex4WYl5ufBmvcjAG5xBQQAE7O9BqowaVOHZEJ+8gze1/XpDQbGqJQE9n9xz8FF7WLvWHUXmi9qdSgZOgKVfHiQFj9akX1T/Q4GEm2ctZbev5mV+Sri9SstOB6Y=; 5:Kfr/NVyjXq/CHhEJyXsPGRAWr9oA+3zKiEsQCaPPmfL2hJTvWoT1W9fQaoNNdaF0CRY4LKW8mkPDBitsccOYUfctoySzHY2dwGDBXDYkJz41U6RXXNjAdXCZEyuM6lE1C1U4jNPycErYa1fuDBKrU8wMzaon0KD2pKpYFSOaBn8=; 24:/9qjlTWruTpF7oGqUIjbj6VYbz5QykA4a0QtBqGNbNGLfKm91n12SZp71WVv3e5iA4WkoWX5/YY6wS53J0NOZUocD5f5UtE+67KrveWQujE=; 7:IXaRvqf7rtHn8lIOcFHCTm8+s8hdJZ/jsD5t6IPaMcMUib5qNmQ/1r7GZDlQsQJ9mEyu4GjqHtr2o+t3KZrCv/VAkN81fc0WSMP50f/rgYy3Px7jRbzv8n7CRGjdTs9RaAiN9m3M4tBWeYj4TQquVFIyb/8ilqjJGtQ2lSiE3kCiMfsDnbfHW6j6VetM4Dkc3M3bLETiFiF+elpDaN0u4HFnbJ324+7u5O7P8a0z4pF2yY8MOiNOx8TKC7x3324g SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2018 22:27:03.9104 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67ac886c-2f19-4fca-5eff-08d589318c2d 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 MLX4_USER_DEV_CAP_LARGE_CQE (via mlx4_ib_alloc_ucontext_resp.dev_caps) and MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET (via mlx4_uverbs_ex_query_device_resp.comp_mask) are copied directly to userspace and form part of the uAPI. Move them to the uapi header where they belong. Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 4 ---- drivers/net/ethernet/mellanox/mlx4/fw.c | 1 + drivers/net/ethernet/mellanox/mlx4/main.c | 1 + include/linux/mlx4/device.h | 4 ---- include/uapi/rdma/mlx4-abi.h | 8 ++++++++ 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 2e3789fffcab7d..bf175b88d10a63 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -572,7 +572,7 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, if (uhw->outlen >= resp.response_length + sizeof(resp.hca_core_clock_offset)) { resp.response_length += sizeof(resp.hca_core_clock_offset); if (!err && !mlx4_is_slave(dev->dev)) { - resp.comp_mask |= QUERY_DEVICE_RESP_MASK_TIMESTAMP; + resp.comp_mask |= MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET; resp.hca_core_clock_offset = clock_params.offset % PAGE_SIZE; } } diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h index d0640bd79679df..87c47b1dd87097 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h @@ -641,10 +641,6 @@ struct mlx4_uverbs_ex_query_device { __u32 reserved; }; -enum query_device_resp_mask { - QUERY_DEVICE_RESP_MASK_TIMESTAMP = 1UL << 0, -}; - static inline struct mlx4_ib_dev *to_mdev(struct ib_device *ibdev) { return container_of(ibdev, struct mlx4_ib_dev, ib_dev); diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 634f603f941c4d..de6b3d41614887 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "fw.h" #include "icm.h" diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 4d84cab77105f3..958619ff24ae61 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -46,6 +46,7 @@ #include #include +#include #include #include diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index a9b5fed8f7c607..81d0799b609168 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h @@ -256,10 +256,6 @@ enum { MLX4_DEV_CAP_EQE_STRIDE_ENABLED = 1LL << 3 }; -enum { - MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0 -}; - enum { MLX4_FUNC_CAP_64B_EQE_CQE = 1L << 0, MLX4_FUNC_CAP_EQE_CQE_STRIDE = 1L << 1, diff --git a/include/uapi/rdma/mlx4-abi.h b/include/uapi/rdma/mlx4-abi.h index d84616adff3264..be58594cec87dc 100644 --- a/include/uapi/rdma/mlx4-abi.h +++ b/include/uapi/rdma/mlx4-abi.h @@ -59,6 +59,10 @@ struct mlx4_ib_alloc_ucontext_resp_v3 { __u16 bf_regs_per_page; }; +enum { + MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0, +}; + struct mlx4_ib_alloc_ucontext_resp { __u32 dev_caps; __u32 qp_tab_size; @@ -162,6 +166,10 @@ struct mlx4_ib_rss_caps { __u8 reserved[7]; }; +enum query_device_resp_mask { + MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, +}; + struct mlx4_uverbs_ex_query_device_resp { __u32 comp_mask; __u32 response_length;