From patchwork Tue Mar 13 22:07:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10281025 X-Patchwork-Delegate: sean.hefty@intel.com 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 C1C1C603B5 for ; Tue, 13 Mar 2018 22:07:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC82A2580E for ; Tue, 13 Mar 2018 22:07:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A123228484; Tue, 13 Mar 2018 22:07:47 +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 348C82807B for ; Tue, 13 Mar 2018 22:07:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052AbeCMWHp (ORCPT ); Tue, 13 Mar 2018 18:07:45 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33261 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbeCMWHo (ORCPT ); Tue, 13 Mar 2018 18:07:44 -0400 Received: by mail-pg0-f66.google.com with SMTP id g12so495086pgs.0 for ; Tue, 13 Mar 2018 15:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UqEewkTBynbFQIc6lDsovHP3ihfhy2Z/2gRANSFSs4M=; b=XFRgbDksjSTnNY0Z0rBDFhU3V/gSli7HBbxIoqiuHwUIh731MzbeA6s6U9JKGAl0mk LJJv0G2SsAvveAWY4Lx7jaaM9KRFGnInbA2pvDCPrJPT3PdW2aETVK9VNFkOTNVtHc/b 4ca0+3iLMJgzOJU6YoQGVz6CGhksIrwGrubri4YUh4Ejr28mAYq96CV8Gz3n2dlqYq2Q dZKrrbgR3qJurqULeijwxDWeN+3E5sAduqZ2wr7PAa5JdM5wlvJDZB680Slvl03QCcz6 DEl6f3CN3yq+/EJEnQTY8yqdDuPInhaRnYI8FuALL26MIRQnVhm2YP6hUmbbDxbM/xC7 bo+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UqEewkTBynbFQIc6lDsovHP3ihfhy2Z/2gRANSFSs4M=; b=DF29HBFz6BhCNBC598dpd14Ba4d73mhjjmuAtnFux+saejsSoyUBLKYxJCuXEoSEHm asHILudT7podSoo8bOZaD2QHMDoPnqtgrSDygel5tYLppjIlUHc6n0EBU9BE8tCaFwfs tAICiWsKId+uJj6nMeqccCEZhDpZ6Q5vM5FrgG/Mp315CnRAJk59fXLSJdHBvA4GriPO C+QQ+3mgfjFs0NoncLs/q2TGcF6XOhec+Kq1LtKdUzdtEED4DbG/W/K8vDgulxNaS72T s8idb8gVHmoFyeEWYRuKAkXu8IG7KAqNya6rwa95fzEq4VPUM9/ClsXAW6jklMwgRAjB ZetA== X-Gm-Message-State: AElRT7GLnDI6oE0V7jCzU3ZvBoFm/7kDlyNeKtxKijYgUXZ9bfPvo8Ew 7nV8EvC2zV6k2A42VJn29KxlVhB13Do= X-Google-Smtp-Source: AG47ELv2JXaZEq4haCFHjDzW/pZAkNONFrYqXftvlBIZStwf4BZzWo013lyyT+9XrgpGpOgRNr2SUw== X-Received: by 10.101.81.204 with SMTP id i12mr1726185pgq.206.1520978863735; Tue, 13 Mar 2018 15:07:43 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id s78sm2023357pfe.162.2018.03.13.15.07.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Mar 2018 15:07:41 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1evs56-0001AS-VW; Tue, 13 Mar 2018 16:07:40 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 1/8] Update kernel headers Date: Tue, 13 Mar 2018 16:07:30 -0600 Message-Id: <20180313220737.4336-2-jgg@ziepe.ca> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180313220737.4336-1-jgg@ziepe.ca> References: <20180313220737.4336-1-jgg@ziepe.ca> 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 From: Jason Gunthorpe To commit d50a8a96ee66 ("IB/mlx4: Move mlx4_uverbs_ex_query_device_resp to include/uapi/") The kernel dropped IB_USER_VERBS_CMD_FLAGS_SHIFT and changed IB_USER_VERBS_CMD_FLAG_EXTENDED, so also adjust to match. Signed-off-by: Jason Gunthorpe --- kernel-headers/rdma/ib_user_verbs.h | 5 +---- kernel-headers/rdma/mlx4-abi.h | 14 ++++++++++++++ kernel-headers/rdma/rdma_user_ioctl.h | 4 ++-- libibverbs/cmd_fallback.c | 4 +--- libibverbs/ibverbs.h | 4 +--- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/kernel-headers/rdma/ib_user_verbs.h b/kernel-headers/rdma/ib_user_verbs.h index 04d0e67b13120c..d56fba09dc8ac3 100644 --- a/kernel-headers/rdma/ib_user_verbs.h +++ b/kernel-headers/rdma/ib_user_verbs.h @@ -141,10 +141,7 @@ struct ib_uverbs_cq_moderation_caps { */ #define IB_USER_VERBS_CMD_COMMAND_MASK 0xff -#define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u -#define IB_USER_VERBS_CMD_FLAGS_SHIFT 24 - -#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80 +#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u struct ib_uverbs_cmd_hdr { __u32 command; diff --git a/kernel-headers/rdma/mlx4-abi.h b/kernel-headers/rdma/mlx4-abi.h index 7f9c37346613e0..d84616adff3264 100644 --- a/kernel-headers/rdma/mlx4-abi.h +++ b/kernel-headers/rdma/mlx4-abi.h @@ -156,4 +156,18 @@ enum mlx4_ib_rx_hash_fields { MLX4_IB_RX_HASH_INNER = 1ULL << 31, }; +struct mlx4_ib_rss_caps { + __u64 rx_hash_fields_mask; /* enum mlx4_ib_rx_hash_fields */ + __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */ + __u8 reserved[7]; +}; + +struct mlx4_uverbs_ex_query_device_resp { + __u32 comp_mask; + __u32 response_length; + __u64 hca_core_clock_offset; + __u32 max_inl_recv_sz; + struct mlx4_ib_rss_caps rss_caps; +}; + #endif /* MLX4_ABI_USER_H */ diff --git a/kernel-headers/rdma/rdma_user_ioctl.h b/kernel-headers/rdma/rdma_user_ioctl.h index 03557b5f9aa6b8..46de0885e8001d 100644 --- a/kernel-headers/rdma/rdma_user_ioctl.h +++ b/kernel-headers/rdma/rdma_user_ioctl.h @@ -65,7 +65,7 @@ struct ib_uverbs_attr { __u16 len; /* only for pointers */ __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */ __u16 reserved; - __u64 data; /* ptr to command, inline data or idr/fd */ + __aligned_u64 data; /* ptr to command, inline data or idr/fd */ }; struct ib_uverbs_ioctl_hdr { @@ -73,7 +73,7 @@ struct ib_uverbs_ioctl_hdr { __u16 object_id; __u16 method_id; __u16 num_attrs; - __u64 reserved; + __aligned_u64 reserved; struct ib_uverbs_attr attrs[0]; }; diff --git a/libibverbs/cmd_fallback.c b/libibverbs/cmd_fallback.c index 1c217dfb78d00d..2acc40f0159094 100644 --- a/libibverbs/cmd_fallback.c +++ b/libibverbs/cmd_fallback.c @@ -242,9 +242,7 @@ int _execute_write_raw_ex(uint32_t cmdnum, struct ibv_context *ctx, size_t resp_bytes = (hdr->hdr.out_words + hdr->ex_hdr.provider_out_words) * 8; - hdr->hdr.command = (IB_USER_VERBS_CMD_FLAG_EXTENDED - << IB_USER_VERBS_CMD_FLAGS_SHIFT) | - cmdnum; + hdr->hdr.command = IB_USER_VERBS_CMD_FLAG_EXTENDED | cmdnum; hdr->ex_hdr.cmd_hdr_reserved = 0; hdr->ex_hdr.response = ioctl_ptr_to_u64(resp); diff --git a/libibverbs/ibverbs.h b/libibverbs/ibverbs.h index 98000ff66e4ccc..c9da536ba7bb6b 100644 --- a/libibverbs/ibverbs.h +++ b/libibverbs/ibverbs.h @@ -81,9 +81,7 @@ struct verbs_ex_private { static inline uint32_t _cmd_ex(uint32_t cmd) { - return (IB_USER_VERBS_CMD_FLAG_EXTENDED - << IB_USER_VERBS_CMD_FLAGS_SHIFT) | - cmd; + return IB_USER_VERBS_CMD_FLAG_EXTENDED | cmd; } #define IBV_INIT_CMD_RESP_EX_V(cmd, cmd_size, size, opcode, out, resp_size,\