Accepting request 1102305 from home:NMorey:branches:science:HPC

- Drop patches adding support for cxgb3 (EOL, removed from kernel 5.5)
  - cxgb3-fix-declaration-of-free_context.patch
  - cxgb3-fix-support-for-new-uquery-API.patch
  - Revert-libcxgb3-Remove-libcxgb3-from-rdma-core.patch
  - Revert-Update-kernel-headers.patch
- Update baselibs=.conf accordingly

OBS-URL: https://build.opensuse.org/request/show/1102305
OBS-URL: https://build.opensuse.org/package/show/science:HPC/rdma-core?expand=0&rev=171
This commit is contained in:
Nicolas Morey 2023-08-04 07:54:16 +00:00 committed by Git OBS Bridge
parent 956bf148e2
commit 236a226b4b
7 changed files with 11 additions and 3492 deletions

View File

@ -1,252 +0,0 @@
commit 35b9f4d5bc4a71edcd4ff78b56c41becf3111fdf
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Fri Jan 10 09:24:53 2020 +0100
Revert "Update kernel headers"
This reverts commit c21a3cf5d9e4cef0904b4d47f1cb43be9efdbf90.
diff --git kernel-headers/CMakeLists.txt kernel-headers/CMakeLists.txt
index 82c191cad089..65d521744500 100644
--- kernel-headers/CMakeLists.txt
+++ kernel-headers/CMakeLists.txt
@@ -1,5 +1,6 @@
publish_internal_headers(rdma
rdma/bnxt_re-abi.h
+ rdma/cxgb3-abi.h
rdma/cxgb4-abi.h
rdma/efa-abi.h
rdma/erdma-abi.h
@@ -16,6 +17,7 @@ publish_internal_headers(rdma
rdma/mlx5_user_ioctl_cmds.h
rdma/mlx5_user_ioctl_verbs.h
rdma/mthca-abi.h
+ rdma/nes-abi.h
rdma/ocrdma-abi.h
rdma/qedr-abi.h
rdma/rdma_netlink.h
@@ -65,6 +67,7 @@ endfunction()
# Transform the kernel ABIs used by the providers
rdma_kernel_provider_abi(
rdma/bnxt_re-abi.h
+ rdma/cxgb3-abi.h
rdma/cxgb4-abi.h
rdma/efa-abi.h
rdma/erdma-abi.h
@@ -75,6 +78,7 @@ rdma_kernel_provider_abi(
rdma/mlx4-abi.h
rdma/mlx5-abi.h
rdma/mthca-abi.h
+ rdma/nes-abi.h
rdma/ocrdma-abi.h
rdma/qedr-abi.h
rdma/rdma_user_rxe.h
diff --git kernel-headers/rdma/cxgb3-abi.h kernel-headers/rdma/cxgb3-abi.h
new file mode 100644
index 000000000000..85aed672f43e
--- /dev/null
+++ kernel-headers/rdma/cxgb3-abi.h
@@ -0,0 +1,82 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
+/*
+ * Copyright (c) 2006 Chelsio, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef CXGB3_ABI_USER_H
+#define CXGB3_ABI_USER_H
+
+#include <linux/types.h>
+
+#define IWCH_UVERBS_ABI_VERSION 1
+
+/*
+ * Make sure that all structs defined in this file remain laid out so
+ * that they pack the same way on 32-bit and 64-bit architectures (to
+ * avoid incompatibility between 32-bit userspace and 64-bit kernels).
+ * In particular do not use pointer types -- pass pointers in __aligned_u64
+ * instead.
+ */
+struct iwch_create_cq_req {
+ __aligned_u64 user_rptr_addr;
+};
+
+struct iwch_create_cq_resp_v0 {
+ __aligned_u64 key;
+ __u32 cqid;
+ __u32 size_log2;
+};
+
+struct iwch_create_cq_resp {
+ __aligned_u64 key;
+ __u32 cqid;
+ __u32 size_log2;
+ __u32 memsize;
+ __u32 reserved;
+};
+
+struct iwch_create_qp_resp {
+ __aligned_u64 key;
+ __aligned_u64 db_key;
+ __u32 qpid;
+ __u32 size_log2;
+ __u32 sq_size_log2;
+ __u32 rq_size_log2;
+};
+
+struct iwch_reg_user_mr_resp {
+ __u32 pbl_addr;
+};
+
+struct iwch_alloc_pd_resp {
+ __u32 pdid;
+};
+
+#endif /* CXGB3_ABI_USER_H */
diff --git kernel-headers/rdma/nes-abi.h kernel-headers/rdma/nes-abi.h
new file mode 100644
index 000000000000..f80495baa969
--- /dev/null
+++ kernel-headers/rdma/nes-abi.h
@@ -0,0 +1,115 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */
+/*
+ * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.
+ * Copyright (c) 2005 Topspin Communications. All rights reserved.
+ * Copyright (c) 2005 Cisco Systems. All rights reserved.
+ * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#ifndef NES_ABI_USER_H
+#define NES_ABI_USER_H
+
+#include <linux/types.h>
+
+#define NES_ABI_USERSPACE_VER 2
+#define NES_ABI_KERNEL_VER 2
+
+/*
+ * Make sure that all structs defined in this file remain laid out so
+ * that they pack the same way on 32-bit and 64-bit architectures (to
+ * avoid incompatibility between 32-bit userspace and 64-bit kernels).
+ * In particular do not use pointer types -- pass pointers in __u64
+ * instead.
+ */
+
+struct nes_alloc_ucontext_req {
+ __u32 reserved32;
+ __u8 userspace_ver;
+ __u8 reserved8[3];
+};
+
+struct nes_alloc_ucontext_resp {
+ __u32 max_pds; /* maximum pds allowed for this user process */
+ __u32 max_qps; /* maximum qps allowed for this user process */
+ __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */
+ __u8 virtwq; /* flag to indicate if virtual WQ are to be used or not */
+ __u8 kernel_ver;
+ __u8 reserved[2];
+};
+
+struct nes_alloc_pd_resp {
+ __u32 pd_id;
+ __u32 mmap_db_index;
+};
+
+struct nes_create_cq_req {
+ __aligned_u64 user_cq_buffer;
+ __u32 mcrqf;
+ __u8 reserved[4];
+};
+
+struct nes_create_qp_req {
+ __aligned_u64 user_wqe_buffers;
+ __aligned_u64 user_qp_buffer;
+};
+
+enum iwnes_memreg_type {
+ IWNES_MEMREG_TYPE_MEM = 0x0000,
+ IWNES_MEMREG_TYPE_QP = 0x0001,
+ IWNES_MEMREG_TYPE_CQ = 0x0002,
+ IWNES_MEMREG_TYPE_MW = 0x0003,
+ IWNES_MEMREG_TYPE_FMR = 0x0004,
+ IWNES_MEMREG_TYPE_FMEM = 0x0005,
+};
+
+struct nes_mem_reg_req {
+ __u32 reg_type; /* indicates if id is memory, QP or CQ */
+ __u32 reserved;
+};
+
+struct nes_create_cq_resp {
+ __u32 cq_id;
+ __u32 cq_size;
+ __u32 mmap_db_index;
+ __u32 reserved;
+};
+
+struct nes_create_qp_resp {
+ __u32 qp_id;
+ __u32 actual_sq_size;
+ __u32 actual_rq_size;
+ __u32 mmap_sq_db_index;
+ __u32 mmap_rq_db_index;
+ __u32 nes_drv_opt;
+};
+
+#endif /* NES_ABI_USER_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
libibverbs
obsoletes "libcxgb3-rdmav2-<targettype> < <version>"
obsoletes "libcxgb4-rdmav2-<targettype> < <version>"
obsoletes "libefa-rdmav2-<targettype> < <version>"
obsoletes "libhfi1verbs-rdmav2-<targettype> < <version>"
@ -8,7 +7,6 @@ libibverbs
obsoletes "libmlx4-rdmav2-<targettype> < <version>"
obsoletes "libmlx5-rdmav2-<targettype> < <version>"
obsoletes "libmthca-rdmav2-<targettype> < <version>"
obsoletes "libnes-rdmav2-<targettype> < <version>"
obsoletes "libocrdma-rdmav2-<targettype> < <version>"
obsoletes "librxe-rdmav2-<targettype> < <version>"
targetarch i586 requires "libefa1-<targettype> = <version>"

View File

@ -1,41 +0,0 @@
commit 439bc8d0af866af6dd0face356bf6074c9ac51f1
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Fri Jul 24 10:44:05 2020 +0200
cxgb3: fix declaration of free_context
free_context got moved to another struct by
a4c102dd6b05 (verbs: Move free_context from verbs_device_ops to verbs_context_ops)
Backport the change to older providers we maintain
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
diff --git providers/cxgb3/iwch.c providers/cxgb3/iwch.c
index 6f3c8b9f1439..2bfca4f58f21 100644
--- providers/cxgb3/iwch.c
+++ providers/cxgb3/iwch.c
@@ -75,6 +75,8 @@ static const struct verbs_match_ent hca_table[] = {
{},
};
+static void iwch_free_context(struct ibv_context *ibctx);
+
static const struct verbs_context_ops iwch_ctx_common_ops = {
.query_device = iwch_query_device,
.query_port = iwch_query_port,
@@ -98,6 +100,7 @@ static const struct verbs_context_ops iwch_ctx_common_ops = {
.detach_mcast = iwch_detach_mcast,
.post_srq_recv = iwch_post_srq_recv,
.req_notify_cq = iwch_arm_cq,
+ .free_context = iwch_free_context,
};
static const struct verbs_context_ops iwch_ctx_t3a_ops = {
@@ -264,6 +267,5 @@ static const struct verbs_device_ops iwch_dev_ops = {
.alloc_device = iwch_device_alloc,
.uninit_device = iwch_uninit_device,
.alloc_context = iwch_alloc_context,
- .free_context = iwch_free_context,
};
PROVIDER_DRIVER(cxgb3, iwch_dev_ops);

View File

@ -1,101 +0,0 @@
commit e8b7609a257e2fd31bc5909913205f88ae9b458c
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Fri Feb 19 09:10:10 2021 +0100
cxgb3: fix support for new uquery API
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
diff --git providers/cxgb3/iwch.c providers/cxgb3/iwch.c
index 2bfca4f58f21..25ce55461a5d 100644
--- providers/cxgb3/iwch.c
+++ providers/cxgb3/iwch.c
@@ -78,7 +78,7 @@ static const struct verbs_match_ent hca_table[] = {
static void iwch_free_context(struct ibv_context *ibctx);
static const struct verbs_context_ops iwch_ctx_common_ops = {
- .query_device = iwch_query_device,
+ .query_device_ex = iwch_query_device,
.query_port = iwch_query_port,
.alloc_pd = iwch_alloc_pd,
.dealloc_pd = iwch_free_pd,
@@ -178,6 +178,19 @@ static void iwch_uninit_device(struct verbs_device *verbs_device)
free(dev);
}
+static int _ibv_get_fw_ver(char *value, size_t len, struct verbs_sysfs_dev *sysfs_dev)
+{
+
+ /*
+ * NOTE: This can only be called by a driver inside the dev_list_lock,
+ * ie during context setup or otherwise.
+ */
+ assert(pthread_mutex_trylock(&dev_list_lock) != 0);
+
+ return (ibv_read_ibdev_sysfs_file(value, len, sysfs_dev, "fw_ver") <= 0);
+}
+
+
static bool iwch_device_match(struct verbs_sysfs_dev *sysfs_dev)
{
char value[32], *cp;
@@ -191,7 +204,7 @@ static bool iwch_device_match(struct verbs_sysfs_dev *sysfs_dev)
* Verify that the firmware major number matches. Major number
* mismatches are fatal. Minor number mismatches are tolerated.
*/
- if (ibv_get_fw_ver(value, sizeof(value), sysfs_dev))
+ if (_ibv_get_fw_ver(value, sizeof(value), sysfs_dev))
return false;
cp = strtok(value+1, ".");
diff --git providers/cxgb3/iwch.h providers/cxgb3/iwch.h
index c7d85d3aab2e..c228197bd483 100644
--- providers/cxgb3/iwch.h
+++ providers/cxgb3/iwch.h
@@ -143,7 +143,8 @@ static inline unsigned long long_log2(unsigned long x)
}
extern int iwch_query_device(struct ibv_context *context,
- struct ibv_device_attr *attr);
+ const struct ibv_query_device_ex_input *input,
+ struct ibv_device_attr_ex *attr, size_t attr_size);
extern int iwch_query_port(struct ibv_context *context, uint8_t port,
struct ibv_port_attr *attr);
diff --git providers/cxgb3/verbs.c providers/cxgb3/verbs.c
index 39a44192e29c..35cde9199279 100644
--- providers/cxgb3/verbs.c
+++ providers/cxgb3/verbs.c
@@ -42,23 +42,27 @@
#include "iwch.h"
#include "iwch-abi.h"
-int iwch_query_device(struct ibv_context *context, struct ibv_device_attr *attr)
+int iwch_query_device(struct ibv_context *context,
+ const struct ibv_query_device_ex_input *input,
+ struct ibv_device_attr_ex *attr, size_t attr_size)
{
- struct ibv_query_device cmd;
+ struct ib_uverbs_ex_query_device_resp resp;
+ size_t resp_size = sizeof(resp);
uint64_t raw_fw_ver;
unsigned major, minor, sub_minor;
int ret;
- ret = ibv_cmd_query_device(context, attr, &raw_fw_ver, &cmd,
- sizeof cmd);
+ ret = ibv_cmd_query_device_any(context, input, attr, attr_size, &resp,
+ &resp_size);
if (ret)
return ret;
+ raw_fw_ver = resp.base.fw_ver;
major = (raw_fw_ver >> 32) & 0xffff;
minor = (raw_fw_ver >> 16) & 0xffff;
sub_minor = raw_fw_ver & 0xffff;
- snprintf(attr->fw_ver, sizeof attr->fw_ver,
+ snprintf(attr->orig_attr.fw_ver, sizeof(attr->orig_attr.fw_ver),
"%d.%d.%d", major, minor, sub_minor);
return 0;

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Aug 3 15:03:33 UTC 2023 - Nicolas Morey <nicolas.morey@suse.com>
- Drop patches adding support for cxgb3 (EOL, removed from kernel 5.5)
- cxgb3-fix-declaration-of-free_context.patch
- cxgb3-fix-support-for-new-uquery-API.patch
- Revert-libcxgb3-Remove-libcxgb3-from-rdma-core.patch
- Revert-Update-kernel-headers.patch
- Update baselibs=.conf accordingly
-------------------------------------------------------------------
Mon Jul 24 07:54:40 UTC 2023 - Nicolas Morey <nicolas.morey@suse.com>

View File

@ -74,11 +74,7 @@ Source3: prebuilt-pandoc.tgz
Source4: rdma-core-rpmlintrc
Source5: gen-pandoc.sh
Source6: get_build.py
Patch0: Revert-libcxgb3-Remove-libcxgb3-from-rdma-core.patch
Patch1: Revert-Update-kernel-headers.patch
Patch2: disable-rdma-interface-renaming.patch
Patch3: cxgb3-fix-declaration-of-free_context.patch
Patch4: cxgb3-fix-support-for-new-uquery-API.patch
Patch0: disable-rdma-interface-renaming.patch
BuildRequires: binutils
BuildRequires: cmake >= 2.8.11
BuildRequires: gcc
@ -237,7 +233,6 @@ fast path operations.
Device-specific plug-in ibverbs userspace drivers are included:
- libcxgb3: Chelsio T3 iWARP HCA
- libcxgb4: Chelsio T4 iWARP HCA
- libefa: Amazon Elastic Fabric Adapter
- libhfi1: Intel Omni-Path HFI
@ -431,10 +426,6 @@ easy, object-oriented access to IB verbs.
#Extract prebuilt pandoc file in the buildlib directory
(cd buildlib && tar xf %{S:3})
%patch0
%patch1
%patch2
%patch3
%patch4
%build