Compare commits

...

8 Commits

Author SHA1 Message Date
eabdullin 71f304621b import UBI rdma-core-46.0-1.el8.1 2023-11-14 20:10:13 +00:00
CentOS Sources ca0bec4b33 import rdma-core-44.0-2.el8.1 2023-05-17 03:02:55 +00:00
CentOS Sources 6d7de2a07d import rdma-core-41.0-1.el8 2022-11-08 09:14:58 +00:00
CentOS Sources 015f57df98 import rdma-core-37.2-1.el8 2022-05-10 11:45:21 +00:00
CentOS Sources 36179cfd96 import rdma-core-35.0-1.el8 2021-11-12 04:22:17 +00:00
CentOS Sources efa753cb66 import rdma-core-32.0-4.el8 2021-09-10 03:47:36 +00:00
CentOS Sources ff70bdc9e7 import rdma-core-29.0-3.el8 2021-09-10 03:47:32 +00:00
CentOS Sources 6e3909bd72 import rdma-core-26.0-8.el8 2021-09-10 03:47:28 +00:00
15 changed files with 1273 additions and 703 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
SOURCES/rdma-core-22.3.tar.gz
SOURCES/rdma-core-46.0.tar.gz
SOURCES/rxe_cfg.8.gz

View File

@ -1 +1,2 @@
94d0e32b8df096fb96f715439373abcadc4e5f4f SOURCES/rdma-core-22.3.tar.gz
9f8871d8f64fbc64002ca64f2b714e38f1623eec SOURCES/rdma-core-46.0.tar.gz
9187638355d9bee854989bbfc6c2956301fd52aa SOURCES/rxe_cfg.8.gz

View File

@ -1,211 +0,0 @@
From 27e4ca889803675fc73c5c8a72231bf21ec00f73 Mon Sep 17 00:00:00 2001
From: Yishai Hadas <yishaih@mellanox.com>
Date: Sun, 10 Feb 2019 10:43:12 +0200
Subject: [PATCH rdma-core 1/3] Update kernel headers
To commit 2c1619edef61 ("IB/cma: Define option to set ack timeout and
pack tos_set")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
---
kernel-headers/rdma/bnxt_re-abi.h | 11 ++++++
kernel-headers/rdma/ib_user_verbs.h | 2 ++
kernel-headers/rdma/rdma_netlink.h | 54 +++++++++++++++++++++--------
kernel-headers/rdma/rdma_user_cm.h | 4 +++
kernel-headers/rdma/rdma_user_rxe.h | 3 +-
5 files changed, 58 insertions(+), 16 deletions(-)
diff --git a/kernel-headers/rdma/bnxt_re-abi.h b/kernel-headers/rdma/bnxt_re-abi.h
index a7a6111e..dc52e3cf 100644
--- a/kernel-headers/rdma/bnxt_re-abi.h
+++ b/kernel-headers/rdma/bnxt_re-abi.h
@@ -44,6 +44,14 @@
#define BNXT_RE_ABI_VERSION 1
+#define BNXT_RE_CHIP_ID0_CHIP_NUM_SFT 0x00
+#define BNXT_RE_CHIP_ID0_CHIP_REV_SFT 0x10
+#define BNXT_RE_CHIP_ID0_CHIP_MET_SFT 0x18
+
+enum {
+ BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL
+};
+
struct bnxt_re_uctx_resp {
__u32 dev_id;
__u32 max_qp;
@@ -51,6 +59,9 @@ struct bnxt_re_uctx_resp {
__u32 cqe_sz;
__u32 max_cqd;
__u32 rsvd;
+ __aligned_u64 comp_mask;
+ __u32 chip_id0;
+ __u32 chip_id1;
};
/*
diff --git a/kernel-headers/rdma/ib_user_verbs.h b/kernel-headers/rdma/ib_user_verbs.h
index 480d9a60..0474c740 100644
--- a/kernel-headers/rdma/ib_user_verbs.h
+++ b/kernel-headers/rdma/ib_user_verbs.h
@@ -270,6 +270,8 @@ struct ib_uverbs_ex_query_device_resp {
struct ib_uverbs_tm_caps tm_caps;
struct ib_uverbs_cq_moderation_caps cq_moderation_caps;
__aligned_u64 max_dm_size;
+ __u32 xrc_odp_caps;
+ __u32 reserved;
};
struct ib_uverbs_query_port {
diff --git a/kernel-headers/rdma/rdma_netlink.h b/kernel-headers/rdma/rdma_netlink.h
index 2e18b77a..3a9e681e 100644
--- a/kernel-headers/rdma/rdma_netlink.h
+++ b/kernel-headers/rdma/rdma_netlink.h
@@ -5,8 +5,7 @@
#include <linux/types.h>
enum {
- RDMA_NL_RDMA_CM = 1,
- RDMA_NL_IWCM,
+ RDMA_NL_IWCM = 2,
RDMA_NL_RSVD,
RDMA_NL_LS, /* RDMA Local Services */
RDMA_NL_NLDEV, /* RDMA device interface */
@@ -14,8 +13,7 @@ enum {
};
enum {
- RDMA_NL_GROUP_CM = 1,
- RDMA_NL_GROUP_IWPM,
+ RDMA_NL_GROUP_IWPM = 2,
RDMA_NL_GROUP_LS,
RDMA_NL_NUM_GROUPS
};
@@ -24,15 +22,17 @@ enum {
#define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
#define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op)
-enum {
- RDMA_NL_RDMA_CM_ID_STATS = 0,
- RDMA_NL_RDMA_CM_NUM_OPS
-};
+/* The minimum version that the iwpm kernel supports */
+#define IWPM_UABI_VERSION_MIN 3
+/* The latest version that the iwpm kernel supports */
+#define IWPM_UABI_VERSION 4
+
+/* iwarp port mapper message flags */
enum {
- RDMA_NL_RDMA_CM_ATTR_SRC_ADDR = 1,
- RDMA_NL_RDMA_CM_ATTR_DST_ADDR,
- RDMA_NL_RDMA_CM_NUM_ATTR,
+
+ /* Do not map the port for this IWPM request */
+ IWPM_FLAGS_NO_PORT_MAP = (1 << 0),
};
/* iwarp port mapper op-codes */
@@ -45,6 +45,7 @@ enum {
RDMA_NL_IWPM_HANDLE_ERR,
RDMA_NL_IWPM_MAPINFO,
RDMA_NL_IWPM_MAPINFO_NUM,
+ RDMA_NL_IWPM_HELLO,
RDMA_NL_IWPM_NUM_OPS
};
@@ -83,20 +84,38 @@ enum {
IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0,
IWPM_NLA_MANAGE_MAPPING_SEQ,
IWPM_NLA_MANAGE_ADDR,
- IWPM_NLA_MANAGE_MAPPED_LOC_ADDR,
+ IWPM_NLA_MANAGE_FLAGS,
+ IWPM_NLA_MANAGE_MAPPING_MAX
+};
+
+enum {
+ IWPM_NLA_RMANAGE_MAPPING_UNSPEC = 0,
+ IWPM_NLA_RMANAGE_MAPPING_SEQ,
+ IWPM_NLA_RMANAGE_ADDR,
+ IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
+ /* The following maintains bisectability of rdma-core */
+ IWPM_NLA_MANAGE_MAPPED_LOC_ADDR = IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
IWPM_NLA_RMANAGE_MAPPING_ERR,
IWPM_NLA_RMANAGE_MAPPING_MAX
};
-#define IWPM_NLA_MANAGE_MAPPING_MAX 3
-#define IWPM_NLA_QUERY_MAPPING_MAX 4
#define IWPM_NLA_MAPINFO_SEND_MAX 3
+#define IWPM_NLA_REMOVE_MAPPING_MAX 3
enum {
IWPM_NLA_QUERY_MAPPING_UNSPEC = 0,
IWPM_NLA_QUERY_MAPPING_SEQ,
IWPM_NLA_QUERY_LOCAL_ADDR,
IWPM_NLA_QUERY_REMOTE_ADDR,
+ IWPM_NLA_QUERY_FLAGS,
+ IWPM_NLA_QUERY_MAPPING_MAX,
+};
+
+enum {
+ IWPM_NLA_RQUERY_MAPPING_UNSPEC = 0,
+ IWPM_NLA_RQUERY_MAPPING_SEQ,
+ IWPM_NLA_RQUERY_LOCAL_ADDR,
+ IWPM_NLA_RQUERY_REMOTE_ADDR,
IWPM_NLA_RQUERY_MAPPED_LOC_ADDR,
IWPM_NLA_RQUERY_MAPPED_REM_ADDR,
IWPM_NLA_RQUERY_MAPPING_ERR,
@@ -114,6 +133,7 @@ enum {
IWPM_NLA_MAPINFO_UNSPEC = 0,
IWPM_NLA_MAPINFO_LOCAL_ADDR,
IWPM_NLA_MAPINFO_MAPPED_ADDR,
+ IWPM_NLA_MAPINFO_FLAGS,
IWPM_NLA_MAPINFO_MAX
};
@@ -132,6 +152,12 @@ enum {
IWPM_NLA_ERR_MAX
};
+enum {
+ IWPM_NLA_HELLO_UNSPEC = 0,
+ IWPM_NLA_HELLO_ABI_VERSION,
+ IWPM_NLA_HELLO_MAX
+};
+
/*
* Local service operations:
* RESOLVE - The client requests the local service to resolve a path.
diff --git a/kernel-headers/rdma/rdma_user_cm.h b/kernel-headers/rdma/rdma_user_cm.h
index 0d1e78eb..e42940a2 100644
--- a/kernel-headers/rdma/rdma_user_cm.h
+++ b/kernel-headers/rdma/rdma_user_cm.h
@@ -300,6 +300,10 @@ enum {
RDMA_OPTION_ID_TOS = 0,
RDMA_OPTION_ID_REUSEADDR = 1,
RDMA_OPTION_ID_AFONLY = 2,
+ RDMA_OPTION_ID_ACK_TIMEOUT = 3
+};
+
+enum {
RDMA_OPTION_IB_PATH = 1
};
diff --git a/kernel-headers/rdma/rdma_user_rxe.h b/kernel-headers/rdma/rdma_user_rxe.h
index 44ef6a3b..aae2e696 100644
--- a/kernel-headers/rdma/rdma_user_rxe.h
+++ b/kernel-headers/rdma/rdma_user_rxe.h
@@ -58,8 +58,7 @@ struct rxe_global_route {
struct rxe_av {
__u8 port_num;
__u8 network_type;
- __u16 reserved1;
- __u32 reserved2;
+ __u8 dmac[6];
struct rxe_global_route grh;
union {
struct sockaddr_in _sockaddr_in;
--
2.20.1

View File

@ -0,0 +1,39 @@
From 91b414f645b0fdca914151280bb14a12258a56e7 Mon Sep 17 00:00:00 2001
From: Honggang Li <honli@redhat.com>
Date: Wed, 13 Jan 2021 11:51:04 +0800
Subject: [PATCH] ibacm: acm.c load plugin while it is soft link
NOTE: THIS ONE IS RHEL SPECIFIC WORKAROUND COMMIT.
https://github.com/linux-rdma/rdma-core/pull/923
Because of commit ad5d934d688911149d795aee1d3b9fa06bf171a9,
the provider libdsap.so.1.0.0 was not opened/used for address resolution
for OPA device.
As discussed in this closed PR:
https://github.com/linux-rdma/rdma-core/pull/848
I create a soft link for libdsap.so => libdsap.so.1.0.0 . The soft link
was ignored because it is a not regular file.
Signed-off-by: Honggang Li <honli@redhat.com>
---
ibacm/src/acm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
index f1c8a2fabfb4..77ffda316b0c 100644
--- a/ibacm/src/acm.c
+++ b/ibacm/src/acm.c
@@ -2878,7 +2878,7 @@ static int acm_open_providers(void)
acm_log(0, "Error - could not stat: %s\n", file_name);
continue;
}
- if (!S_ISREG(buf.st_mode))
+ if (!(S_ISREG(buf.st_mode) || S_ISLNK(buf.st_mode)))
continue;
acm_log(2, "Loading provider %s...\n", file_name);
--
2.25.4

View File

@ -1,287 +0,0 @@
From 8e527a2d5eb6ef506a14f38095a576b8b470ce56 Mon Sep 17 00:00:00 2001
From: Devesh Sharma <devesh.sharma@broadcom.com>
Date: Sun, 13 Jan 2019 14:36:13 -0500
Subject: [PATCH rdma-core 2/3] bnxt_re/lib: Enable Broadcom's 57500 RoCE
adapter
This is to add Broadcom's 57500 series of adapters support
to RoCE from libbnxt_re. Listing below the significant changes
done as part of the patch.
- Added the pci-id of the basic gen-p5 chip.
- Adjust psn search memory allocation to suite new search
psn structure.
- Added chip context structure to select the appropriate
execution flow in data-path and control path.
- Fill psn search area as per new or older chip execution
flow.
- removed duplicate declaration of BNXT_RE_ABI_VERSION macro
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
---
providers/bnxt_re/bnxt_re-abi.h | 10 +++++--
providers/bnxt_re/main.c | 14 +++++++++
providers/bnxt_re/main.h | 15 +++++++++-
providers/bnxt_re/verbs.c | 50 +++++++++++++++++++++++----------
4 files changed, 71 insertions(+), 18 deletions(-)
diff --git a/providers/bnxt_re/bnxt_re-abi.h b/providers/bnxt_re/bnxt_re-abi.h
index 65d048d3..c6998e85 100644
--- a/providers/bnxt_re/bnxt_re-abi.h
+++ b/providers/bnxt_re/bnxt_re-abi.h
@@ -43,8 +43,6 @@
#include <rdma/bnxt_re-abi.h>
#include <kernel-abi/bnxt_re-abi.h>
-#define BNXT_RE_ABI_VERSION 1
-
#define BNXT_RE_FULL_FLAG_DELTA 0x80
DECLARE_DRV_CMD(ubnxt_re_pd, IB_USER_VERBS_CMD_ALLOC_PD,
@@ -246,6 +244,14 @@ struct bnxt_re_psns {
__le32 flg_npsn;
};
+struct bnxt_re_psns_ext {
+ __u32 opc_spsn;
+ __u32 flg_npsn;
+ __u16 st_slot_idx;
+ __u16 rsvd0;
+ __u32 rsvd1;
+};
+
struct bnxt_re_sge {
__le64 pa;
__le32 lkey;
diff --git a/providers/bnxt_re/main.c b/providers/bnxt_re/main.c
index 1cd4d880..d171748e 100644
--- a/providers/bnxt_re/main.c
+++ b/providers/bnxt_re/main.c
@@ -74,6 +74,7 @@ static const struct verbs_match_ent cna_table[] = {
CNA(BROADCOM, 0x16EF), /* BCM57416 NPAR */
CNA(BROADCOM, 0x16F0), /* BCM58730 */
CNA(BROADCOM, 0x16F1), /* BCM57452 */
+ CNA(BROADCOM, 0x1750), /* BCM57500 */
CNA(BROADCOM, 0xD800), /* BCM880xx VF */
CNA(BROADCOM, 0xD802), /* BCM58802 */
CNA(BROADCOM, 0xD804), /* BCM8804 SR */
@@ -108,6 +109,11 @@ static const struct verbs_context_ops bnxt_re_cntx_ops = {
.destroy_ah = bnxt_re_destroy_ah
};
+bool bnxt_re_is_chip_gen_p5(struct bnxt_re_chip_ctx *cctx)
+{
+ return cctx->chip_num == CHIP_NUM_57500;
+}
+
/* Context Init functions */
static struct verbs_context *bnxt_re_alloc_context(struct ibv_device *vdev,
int cmd_fd,
@@ -133,6 +139,14 @@ static struct verbs_context *bnxt_re_alloc_context(struct ibv_device *vdev,
dev->pg_size = resp.pg_size;
dev->cqe_size = resp.cqe_sz;
dev->max_cq_depth = resp.max_cqd;
+ if (resp.comp_mask & BNXT_RE_UCNTX_CMASK_HAVE_CCTX) {
+ cntx->cctx.chip_num = resp.chip_id0 & 0xFFFF;
+ cntx->cctx.chip_rev = (resp.chip_id0 >>
+ BNXT_RE_CHIP_ID0_CHIP_REV_SFT) & 0xFF;
+ cntx->cctx.chip_metal = (resp.chip_id0 >>
+ BNXT_RE_CHIP_ID0_CHIP_MET_SFT) &
+ 0xFF;
+ }
pthread_spin_init(&cntx->fqlock, PTHREAD_PROCESS_PRIVATE);
/* mmap shared page. */
cntx->shpg = mmap(NULL, dev->pg_size, PROT_READ | PROT_WRITE,
diff --git a/providers/bnxt_re/main.h b/providers/bnxt_re/main.h
index 0b5c749f..be573496 100644
--- a/providers/bnxt_re/main.h
+++ b/providers/bnxt_re/main.h
@@ -54,7 +54,14 @@
#define DEV "bnxt_re : "
-#define BNXT_RE_UD_QP_HW_STALL 0x400000
+#define BNXT_RE_UD_QP_HW_STALL 0x400000
+
+#define CHIP_NUM_57500 0x1750
+struct bnxt_re_chip_ctx {
+ __u16 chip_num;
+ __u8 chip_rev;
+ __u8 chip_metal;
+};
struct bnxt_re_dpi {
__u32 dpindx;
@@ -81,6 +88,7 @@ struct bnxt_re_cq {
};
struct bnxt_re_wrid {
+ struct bnxt_re_psns_ext *psns_ext;
struct bnxt_re_psns *psns;
uint64_t wrid;
uint32_t bytes;
@@ -111,6 +119,7 @@ struct bnxt_re_srq {
struct bnxt_re_qp {
struct ibv_qp ibvqp;
+ struct bnxt_re_chip_ctx *cctx;
struct bnxt_re_queue *sqq;
struct bnxt_re_wrid *swrid;
struct bnxt_re_queue *rqq;
@@ -155,6 +164,7 @@ struct bnxt_re_context {
struct verbs_context ibvctx;
uint32_t dev_id;
uint32_t max_qp;
+ struct bnxt_re_chip_ctx cctx;
uint32_t max_srq;
struct bnxt_re_dpi udpi;
void *shpg;
@@ -162,6 +172,9 @@ struct bnxt_re_context {
pthread_spinlock_t fqlock;
};
+/* Chip context related functions */
+bool bnxt_re_is_chip_gen_p5(struct bnxt_re_chip_ctx *cctx);
+
/* DB ring functions used internally*/
void bnxt_re_ring_rq_db(struct bnxt_re_qp *qp);
void bnxt_re_ring_sq_db(struct bnxt_re_qp *qp);
diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c
index 7786d247..bec382b3 100644
--- a/providers/bnxt_re/verbs.c
+++ b/providers/bnxt_re/verbs.c
@@ -844,9 +844,11 @@ static void bnxt_re_free_queues(struct bnxt_re_qp *qp)
static int bnxt_re_alloc_queues(struct bnxt_re_qp *qp,
struct ibv_qp_init_attr *attr,
uint32_t pg_size) {
+ struct bnxt_re_psns_ext *psns_ext;
struct bnxt_re_queue *que;
struct bnxt_re_psns *psns;
uint32_t psn_depth;
+ uint32_t psn_size;
int ret, indx;
que = qp->sqq;
@@ -857,11 +859,12 @@ static int bnxt_re_alloc_queues(struct bnxt_re_qp *qp,
que->diff = que->depth - attr->cap.max_send_wr;
/* psn_depth extra entries of size que->stride */
- psn_depth = (que->depth * sizeof(struct bnxt_re_psns)) /
- que->stride;
- if ((que->depth * sizeof(struct bnxt_re_psns)) % que->stride)
+ psn_size = bnxt_re_is_chip_gen_p5(qp->cctx) ?
+ sizeof(struct bnxt_re_psns_ext) :
+ sizeof(struct bnxt_re_psns);
+ psn_depth = (que->depth * psn_size) / que->stride;
+ if ((que->depth * psn_size) % que->stride)
psn_depth++;
-
que->depth += psn_depth;
/* PSN-search memory is allocated without checking for
* QP-Type. Kenrel driver do not map this memory if it
@@ -875,6 +878,7 @@ static int bnxt_re_alloc_queues(struct bnxt_re_qp *qp,
que->depth -= psn_depth;
/* start of spsn space sizeof(struct bnxt_re_psns) each. */
psns = (que->va + que->stride * que->depth);
+ psns_ext = (struct bnxt_re_psns_ext *)psns;
pthread_spin_init(&que->qlock, PTHREAD_PROCESS_PRIVATE);
qp->swrid = calloc(que->depth, sizeof(struct bnxt_re_wrid));
if (!qp->swrid) {
@@ -884,6 +888,13 @@ static int bnxt_re_alloc_queues(struct bnxt_re_qp *qp,
for (indx = 0 ; indx < que->depth; indx++, psns++)
qp->swrid[indx].psns = psns;
+ if (bnxt_re_is_chip_gen_p5(qp->cctx)) {
+ for (indx = 0 ; indx < que->depth; indx++, psns_ext++) {
+ qp->swrid[indx].psns_ext = psns_ext;
+ qp->swrid[indx].psns = (struct bnxt_re_psns *)psns_ext;
+ }
+ }
+
qp->cap.max_swr = que->depth;
if (qp->rqq) {
@@ -931,6 +942,7 @@ struct ibv_qp *bnxt_re_create_qp(struct ibv_pd *ibvpd,
if (bnxt_re_alloc_queue_ptr(qp, attr))
goto fail;
/* alloc queues */
+ qp->cctx = &cntx->cctx;
if (bnxt_re_alloc_queues(qp, attr, dev->pg_size))
goto failq;
/* Fill ibv_cmd */
@@ -1094,26 +1106,36 @@ static int bnxt_re_build_sge(struct bnxt_re_sge *sge, struct ibv_sge *sg_list,
return length;
}
-static void bnxt_re_fill_psns(struct bnxt_re_qp *qp, struct bnxt_re_psns *psns,
+static void bnxt_re_fill_psns(struct bnxt_re_qp *qp, struct bnxt_re_wrid *wrid,
uint8_t opcode, uint32_t len)
{
- uint32_t pkt_cnt = 0, nxt_psn;
+ uint32_t opc_spsn = 0, flg_npsn = 0;
+ struct bnxt_re_psns_ext *psns_ext;
+ uint32_t pkt_cnt = 0, nxt_psn = 0;
+ struct bnxt_re_psns *psns;
+
+ psns = wrid->psns;
+ psns_ext = wrid->psns_ext;
- memset(psns, 0, sizeof(*psns));
if (qp->qptyp == IBV_QPT_RC) {
- psns->opc_spsn = htole32(qp->sq_psn & BNXT_RE_PSNS_SPSN_MASK);
+ opc_spsn = qp->sq_psn & BNXT_RE_PSNS_SPSN_MASK;
pkt_cnt = (len / qp->mtu);
if (len % qp->mtu)
pkt_cnt++;
if (len == 0)
pkt_cnt = 1;
nxt_psn = ((qp->sq_psn + pkt_cnt) & BNXT_RE_PSNS_NPSN_MASK);
- psns->flg_npsn = htole32(nxt_psn);
+ flg_npsn = nxt_psn;
qp->sq_psn = nxt_psn;
}
opcode = bnxt_re_ibv_wr_to_wc_opcd(opcode);
- psns->opc_spsn |= htole32(((opcode & BNXT_RE_PSNS_OPCD_MASK) <<
- BNXT_RE_PSNS_OPCD_SHIFT));
+ opc_spsn |= (((uint32_t)opcode & BNXT_RE_PSNS_OPCD_MASK) <<
+ BNXT_RE_PSNS_OPCD_SHIFT);
+ memset(psns, 0, sizeof(*psns));
+ psns->opc_spsn = htole32(opc_spsn);
+ psns->flg_npsn = htole32(flg_npsn);
+ if (bnxt_re_is_chip_gen_p5(qp->cctx))
+ psns_ext->st_slot_idx = 0;
}
static void bnxt_re_fill_wrid(struct bnxt_re_wrid *wrid, struct ibv_send_wr *wr,
@@ -1235,10 +1257,9 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
{
struct bnxt_re_qp *qp = to_bnxt_re_qp(ibvqp);
struct bnxt_re_queue *sq = qp->sqq;
- struct bnxt_re_bsqe *hdr;
struct bnxt_re_wrid *wrid;
- struct bnxt_re_psns *psns;
uint8_t is_inline = false;
+ struct bnxt_re_bsqe *hdr;
int ret = 0, bytes = 0;
bool ring_db = false;
void *sqe;
@@ -1268,7 +1289,6 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
sqe = (void *)(sq->va + (sq->tail * sq->stride));
wrid = &qp->swrid[sq->tail];
- psns = wrid->psns;
memset(sqe, 0, bnxt_re_get_sqe_sz());
hdr = sqe;
@@ -1318,7 +1338,7 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
}
bnxt_re_fill_wrid(wrid, wr, bytes, qp->cap.sqsig);
- bnxt_re_fill_psns(qp, psns, wr->opcode, bytes);
+ bnxt_re_fill_psns(qp, wrid, wr->opcode, bytes);
bnxt_re_incr_tail(sq);
qp->wqe_cnt++;
wr = wr->next;
--
2.20.1

View File

@ -0,0 +1,52 @@
From 30f781482122db14f7bf89cb31db1c6aba30bba8 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 8 Feb 2023 15:19:17 +0100
Subject: [PATCH 2/2] systemd: drop Protect* options not supported in RHEL 8
systemd
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
ibacm/ibacm.service.in | 2 --
iwpmd/iwpmd.service.in | 2 --
rdma-ndd/rdma-ndd.service.in | 1 -
3 files changed, 5 deletions(-)
diff --git a/ibacm/ibacm.service.in b/ibacm/ibacm.service.in
index 56538beb2b15..535e1aeae326 100644
--- a/ibacm/ibacm.service.in
+++ b/ibacm/ibacm.service.in
@@ -19,8 +19,6 @@ Type=notify
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/ibacm --systemd
ProtectSystem=full
ProtectHome=true
-ProtectHostname=true
-ProtectKernelLogs=true
[Install]
Also=ibacm.socket
diff --git a/iwpmd/iwpmd.service.in b/iwpmd/iwpmd.service.in
index 47afebd8ad02..dd4dc750c26c 100644
--- a/iwpmd/iwpmd.service.in
+++ b/iwpmd/iwpmd.service.in
@@ -26,7 +26,5 @@ ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/iwpmd --systemd
LimitNOFILE=102400
ProtectSystem=full
ProtectHome=true
-ProtectHostname=true
-ProtectKernelLogs=true
# iwpmd is automatically wanted by udev when an iWarp RDMA device is present
diff --git a/rdma-ndd/rdma-ndd.service.in b/rdma-ndd/rdma-ndd.service.in
index 368deec00b2c..9cbe93fb6900 100644
--- a/rdma-ndd/rdma-ndd.service.in
+++ b/rdma-ndd/rdma-ndd.service.in
@@ -22,6 +22,5 @@ Restart=always
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/rdma-ndd --systemd
ProtectSystem=full
ProtectHome=true
-ProtectKernelLogs=true
# rdma-ndd is automatically wanted by udev when an RDMA device with a node description is present
--
2.39.1

View File

@ -0,0 +1,50 @@
From 214c673b2a66a0ceb86a21ddb8cd7beba86cc6f3 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 1 Feb 2023 15:24:23 +0100
Subject: [PATCH] CMakeLists: disable providers that were not enabled in RHEL
9.1
Doing a package rebase, but don't want to enable additional drivers
unless explicitly requested.
Upstream Status: RHEL only
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b7462861012..cfe79bcfacf3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -711,7 +711,7 @@ add_subdirectory(providers/bnxt_re)
add_subdirectory(providers/cxgb4) # NO SPARSE
add_subdirectory(providers/efa)
add_subdirectory(providers/efa/man)
-add_subdirectory(providers/erdma)
+#add_subdirectory(providers/erdma)
add_subdirectory(providers/hns)
add_subdirectory(providers/irdma)
add_subdirectory(providers/mana)
@@ -720,14 +720,14 @@ add_subdirectory(providers/mlx4)
add_subdirectory(providers/mlx4/man)
add_subdirectory(providers/mlx5)
add_subdirectory(providers/mlx5/man)
-add_subdirectory(providers/mthca)
-add_subdirectory(providers/ocrdma)
+#add_subdirectory(providers/mthca)
+#add_subdirectory(providers/ocrdma)
add_subdirectory(providers/qedr)
add_subdirectory(providers/vmw_pvrdma)
endif()
add_subdirectory(providers/hfi1verbs)
-add_subdirectory(providers/ipathverbs)
+#add_subdirectory(providers/ipathverbs)
add_subdirectory(providers/rxe)
add_subdirectory(providers/rxe/man)
add_subdirectory(providers/siw)
--
2.40.1

View File

@ -1,31 +0,0 @@
From cfae5eb767be97f62999a450ae602c7215614408 Mon Sep 17 00:00:00 2001
From: Yishai Hadas <yishaih@mellanox.com>
Date: Sun, 10 Mar 2019 12:03:58 +0200
Subject: [PATCH rdma-core 3/3] mlx5: Add new device IDs
Add ConnectX-6 DX HCA ID.
In addition, add "ConnectX family mlx5Gen Virtual Function" device ID.
Every new HCA VF will be identified with this device ID.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
---
providers/mlx5/mlx5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/providers/mlx5/mlx5.c b/providers/mlx5/mlx5.c
index 08edfd85..1faae919 100644
--- a/providers/mlx5/mlx5.c
+++ b/providers/mlx5/mlx5.c
@@ -74,6 +74,8 @@ static const struct verbs_match_ent hca_table[] = {
HCA(MELLANOX, 0x101a), /* ConnectX-5 Ex VF */
HCA(MELLANOX, 0x101b), /* ConnectX-6 */
HCA(MELLANOX, 0x101c), /* ConnectX-6 VF */
+ HCA(MELLANOX, 0x101d), /* ConnectX-6 DX */
+ HCA(MELLANOX, 0x101e), /* ConnectX family mlx5Gen Virtual Function */
HCA(MELLANOX, 0xa2d2), /* BlueField integrated ConnectX-5 network controller */
HCA(MELLANOX, 0xa2d3), /* BlueField integrated ConnectX-5 network controller VF */
{}
--
2.20.1

View File

@ -0,0 +1,42 @@
From 1c63f25b55ca4f5317e1c85b548469bbc747e147 Mon Sep 17 00:00:00 2001
From: "Goldman, Adam" <adam.goldman@intel.com>
Date: Tue, 4 Feb 2020 08:55:20 -0500
Subject: [PATCH] kernel-boot: Do not perform device rename on OPA devices
PSM2 will not run with recent rdma-core releases. Several tools and
libraries like PSM2, require the hfi1 name to be present.
Recent rdma-core releases added a new feature to rename kernel devices,
but the default configuration will not work with hfi1 fabrics.
Related opa-psm2 github issue:
https://github.com/intel/opa-psm2/issues/43
Fixes: 5b4099d47be3 ("kernel-boot: Perform device rename to make stable names")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Goldman, Adam <adam.goldman@intel.com>
---
kernel-boot/rdma-persistent-naming.rules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel-boot/rdma-persistent-naming.rules b/kernel-boot/rdma-persistent-naming.rules
index 6f9c53a5..3ce34ea9 100644
--- a/kernel-boot/rdma-persistent-naming.rules
+++ b/kernel-boot/rdma-persistent-naming.rules
@@ -26,10 +26,10 @@
# Device type = RoCE
# mlx5_0 -> rocex525400c0fe123455
#
-ACTION=="add", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FALLBACK"
+ACTION=="add", SUBSYSTEM=="infiniband", KERNEL!="hfi1*", PROGRAM="rdma_rename %k NAME_FALLBACK"
# Example:
# * NAME_FIXED
# fixed name for specific board_id
#
-#ACTION=="add", ATTR{board_id}=="MSF0010110035", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED myib"
\ No newline at end of file
+#ACTION=="add", ATTR{board_id}=="MSF0010110035", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED myib"
--
2.30.1

View File

@ -0,0 +1,31 @@
From 538cd05b34bf15076ce40273926d7580d421a670 Mon Sep 17 00:00:00 2001
From: Jarod Wilson <jarod@redhat.com>
Date: Wed, 21 Aug 2019 17:09:13 -0400
Subject: [PATCH] udev: keep NAME_KERNEL as default interface naming convention
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
kernel-boot/rdma-persistent-naming.rules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel-boot/rdma-persistent-naming.rules b/kernel-boot/rdma-persistent-naming.rules
index 6f9c53a5..b5413edb 100644
--- a/kernel-boot/rdma-persistent-naming.rules
+++ b/kernel-boot/rdma-persistent-naming.rules
@@ -26,10 +26,10 @@
# Device type = RoCE
# mlx5_0 -> rocex525400c0fe123455
#
-ACTION=="add", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FALLBACK"
+ACTION=="add", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_KERNEL"
# Example:
# * NAME_FIXED
# fixed name for specific board_id
#
-#ACTION=="add", ATTR{board_id}=="MSF0010110035", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED myib"
\ No newline at end of file
+#ACTION=="add", ATTR{board_id}=="MSF0010110035", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED myib"
--
2.30.1

View File

@ -1,17 +0,0 @@
Index: rdma-core-15/kernel-boot/rdma-hw-modules.rules
===================================================================
--- rdma-core-15.orig/kernel-boot/rdma-hw-modules.rules
+++ rdma-core-15/kernel-boot/rdma-hw-modules.rules
@@ -11,7 +11,11 @@ ENV{ID_NET_DRIVER}=="bnxt_en", RUN{built
ENV{ID_NET_DRIVER}=="cxgb3", RUN{builtin}+="kmod load iw_cxgb3"
ENV{ID_NET_DRIVER}=="cxgb4", RUN{builtin}+="kmod load iw_cxgb4"
ENV{ID_NET_DRIVER}=="hns", RUN{builtin}+="kmod load hns_roce"
-ENV{ID_NET_DRIVER}=="i40e", RUN{builtin}+="kmod load i40iw"
+# i40iw is not entirely suspend/resume friendly, and many systems with
+# i40e NICs aren't iwarp-capable, so Red Hat defaults to not auto-loading
+# the i40iw driver here to keep suspend/resume working. The i40iw driver
+# can still be loaded as needed by the rdma systemd service script.
+# ENV{ID_NET_DRIVER}=="i40e", RUN{builtin}+="kmod load i40iw"
ENV{ID_NET_DRIVER}=="mlx4_en", RUN{builtin}+="kmod load mlx4_ib"
ENV{ID_NET_DRIVER}=="mlx5_core", RUN{builtin}+="kmod load mlx5_ib"
ENV{ID_NET_DRIVER}=="qede", RUN{builtin}+="kmod load qedr"

View File

@ -26,9 +26,13 @@ fi
ibdevs=$(ls /sys/class/infiniband/)
pushd /sys/class/net > /dev/null
devs=$(ls -d e* i* 2> /dev/null)
popd > /dev/null
devs=''
for netdev in $(/bin/ls /sys/class/net/); do
if [ -e /sys/class/net/${netdev}/device/infiniband ]; then
devs="${devs} ${netdev}"
fi
done
if [ "x$devs" == "x" ]; then
# no relevant devices - quit immediately
exit
@ -161,7 +165,7 @@ if [ "x$oldstyle" == "xn" ]; then
if [ -f $filepath_vpd ]; then
tmp=$ifs
ifs=":"
vpd_content=`cat $filepath_vpd`
vpd_content=`cat $filepath_vpd | tr -d '\0'`
devdesc=$(printf "%-15s" "$(echo $vpd_content | strings | head -1)")
partid=$(printf "%-11s" "$(echo $vpd_content | strings | head -4 | tail -1 | gawk '{print $1}')")
ifs=$tmp

View File

@ -1,29 +0,0 @@
commit bda9530d37c5451928f6ba2c0ddc8c14d367d581
Author: Jarod Wilson <jarod@redhat.com>
Date: Mon Mar 6 15:44:49 2017 -0500
redhat/kernel-init: libi40iw no longer tech-preview
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Index: rdma-core-17.1/redhat/rdma.kernel-init
===================================================================
--- rdma-core-17.1.orig/redhat/rdma.kernel-init
+++ rdma-core-17.1/redhat/rdma.kernel-init
@@ -141,11 +141,12 @@ load_hardware_modules()
load_modules usnic_verbs
RC+=$?
fi
+ if is_loaded i40e -a ! is_loaded i40iw; then
+ load_modules i40iw
+ RC+=$?
+ fi
if [ "${LOAD_TECH_PREVIEW_DRIVERS}" == "yes" ]; then
- if is_loaded i40e -a ! is_loaded i40iw; then
- load_modules i40iw
- RC+=$?
- fi
+ continue
fi
return $RC
}

677
SOURCES/rxe_cfg Executable file
View File

@ -0,0 +1,677 @@
#!/usr/bin/perl
# * Copyright (c) 2009-2011 Mellanox Technologies Ltd. All rights reserved.
# * Copyright (c) 2009-2011 System Fabric Works, 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.
#
use warnings;
use strict;
use File::Basename;
use File::Path qw(make_path);
use Getopt::Long;
my $help = 0;
my $no_persist = 0;
my $debug = 0;
my $force = 0;
my $linkonly = 0;
my $parms = "/sys/module/rdma_rxe/parameters";
my $modprobe_opt = "";
my $modprobe_checked = "0";
my $persistence_path = "/var/lib/rxe";
my $persistence_file = "${persistence_path}/rxe";
my $num_persistent = 0;
my $sys = "/sys/module/rdma_rxe/parameters";
my %rxe_names;
my @rxe_array;
my %eth_names;
my @eth_list;
my %eth_driver;
my %link_state;
my %link_speed;
my %eth_mtu;
my %ipv4_addr;
my %rxe_mtu;
my @persistence_array;
my %persistence_hash;
my @mlx4_port;
my @mlx4_ether;
my @roce_list;
# Read a file and return its contents as a string.
sub read_file {
my $filename = shift;
my $result = "";
if (open(FILE, $filename)) {
$result = <FILE>;
close FILE;
}
return $result;
}
#get mapping between rxe and eth devices
sub get_names {
my $i = 0;
foreach my $rxe (glob("/sys/class/infiniband/rxe*")) {
$rxe = basename($rxe);
my $eth = read_file("/sys/class/infiniband/$rxe/parent");
chomp($eth);
if (($eth =~ /[\w]+[\d]/)
&& ($rxe =~ /rxe[0123456789]/)) {
# hash ethername to rxename
$rxe_names{$eth} = $rxe;
$rxe_array[$i++] = $rxe;
# hash rxename to ethername
$eth_names{$rxe} = $eth;
}
}
}
# get list of Mellanox RoCE ports
sub get_mlx4_list {
my $i = 0;
foreach my $mlx4 (glob("/sys/class/infiniband/mlx4_*")) {
$mlx4 = basename($mlx4);
foreach my $port (glob("/sys/class/infiniband/$mlx4/ports/*")) {
$port = basename($port);
my $link = read_file("$port/link_layer");
chomp($link);
if ($link =~ "Ethernet") {
$roce_list[$i++] = "$mlx4:$port";
}
}
}
}
#collect per device information
sub get_dev_info {
my @list;
my @fields;
my @lines;
my $line;
my $eth;
my $drv;
my $np;
my $i = 0;
my $j = 0;
get_mlx4_list();
my @my_eth_list = ();
foreach my $my_eth_dev (glob("/sys/class/net/*")) {
$my_eth_dev = basename($my_eth_dev);
if ($my_eth_dev ne "bonding_masters"){
my $my_dev_type = read_file("/sys/class/net/${my_eth_dev}/type");
chomp($my_dev_type);
if ($my_dev_type == "1") {
push(@my_eth_list, "$my_eth_dev");
}
}
}
@list = @my_eth_list;
foreach $eth (@list) {
chomp($eth);
$eth_list[$i++] = $eth;
@lines = `ethtool -i $eth`;
foreach $line (@lines) {
chomp($line);
@fields = split(/\s+/, $line);
chomp($fields[0]);
if ($fields[0] =~ /driver:/) {
$drv = $fields[1];
$eth_driver{$eth} = $drv;
if ($drv =~ /mlx4_en/ && scalar(@roce_list) > 0 ) {
$eth_names{$roce_list[$j++]} = $eth;
}
}
}
# get link status
$link_state{$eth} = "";
$link_speed{$eth} = "";
@lines = `ethtool $eth`;
foreach $line (@lines) {
chomp($line);
@fields = split(/:/, $line);
if (defined($fields[1])) {
$fields[1] =~ s/^\s+//g;
if ($fields[0] =~ "Link detected") {
$link_state{$eth} = $fields[1];
}
}
elsif ($line =~ "10000baseT") {
$link_speed{$eth} = "10GigE";
}
}
$ipv4_addr{$eth} = " ";
$eth_mtu{$eth} = "";
@lines = `ip addr show $eth`;
foreach $line (@lines) {
# get IP address
if ($line =~ /inet /) {
$line =~ s/^\s+inet ([0-9.]+)\//$1 /g;
@fields = split(/\s+/, $line);
$ipv4_addr{$eth} = $fields[0];
}
# get ethernet mtu
if ($line =~ /mtu /) {
$line =~ s/^.*mtu //g;
@fields = split(/\s+/, $line);
$eth_mtu{$eth} = $fields[0];
}
}
}
# get rxe mtu
foreach my $rxe (@rxe_array) {
@lines = `ibv_devinfo -d $rxe`;
foreach $line (@lines) {
if ($line =~ "active_mtu") {
$line =~ s/^\s+active_mtu:\s+//g;
chomp($line);
$rxe_mtu{$rxe} = $line;
}
}
$rxe_mtu{$rxe} = "(?)" if (!$rxe_mtu{$rxe});
}
}
# return string or the string "###" if string is all whitespace
sub set_field {
my $fld = $_[0];
if (defined($fld) && $fld =~ /\S/) {
return $fld;
} else {
return "###";
}
}
# format status output into fixed width columns
sub status_print {
my @fields;
my $field;
my @flen = ();
my $num_fields = 0;
my $i;
my $pad;
my $line;
# one pass to size the columns
foreach $line (@_) {
@fields = split(/\s+/, $line);
$i = 0;
foreach $field (@fields) {
if (!defined($flen[$i])) {
$flen[$i] = length($field);
}
else {
$flen[$i] = max($flen[$i], length($field));
}
$i++;
}
if ($i > $num_fields) {
$num_fields = $i;
}
}
# one pass to print
foreach $line (@_) {
print " ";
@fields = split(/\s+/, $line);
for ($i = 0; $i < $num_fields; $i++) {
if (defined($fields[$i])) {
$pad = $flen[$i] - length($fields[$i]) + 2;
}
else {
$pad = $flen[$i] + 2;
}
if (defined($fields[$i]) && ($fields[$i] ne "###")) {
print "$fields[$i]";
}
else {
print " ";
}
printf("%*s", $pad, "");
}
print "\n";
}
}
# check driver load status
sub check_module_status {
if (-e $sys) {
return 0;
} else {
return 1;
}
}
# print driver load status and ethertype for rdma_rxe and rdma_rxe_net
sub show_module_status {
print "rdma_rxe module not loaded\n" if (!(-e $sys));
}
# print rxe status
sub do_status {
my $instance = $_[0];
my $ln = 0;
my @outp;
my $rxe;
my $rmtu;
get_names();
get_dev_info();
show_module_status();
$outp[$ln++] = "Name\tLink\tDriver\t\tSpeed\tNMTU\tIPv4_addr\tRDEV\tRMTU";
foreach my $eth (@eth_list) {
# handle case where rxe_drivers are not loaded
if (defined($rxe_names{$eth})) {
$rxe = $rxe_names{$eth};
$rmtu = $rxe_mtu{$rxe};
}
else {
$rxe = "";
$rmtu = "";
}
if ((!defined($instance)
&& (($linkonly == 0) || ($link_state{$eth} =~ "yes")))
|| (defined($instance) && ($rxe =~ "$instance"))) {
$outp[$ln] = set_field("$eth");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$link_state{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field(exists($eth_driver{$eth}) ? $eth_driver{$eth} : "");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$link_speed{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$eth_mtu{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$ipv4_addr{$eth}");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$rxe");
$outp[$ln] .= "\t";
$outp[$ln] .= set_field("$rmtu");
$ln++;
}
}
status_print(@outp);
}
# read file containing list of ethernet devices into a list
sub populate_persistence {
my $i = 0;
open FILE, $persistence_file;
while(<FILE>) {
my $line = $_;
chomp($line);
$line =~ s/^\s+//g;
if ($line =~ /[\w]+[\d]/) {
# in case we add fields later
my ($eth, $cruft) = split(/\s+/, $line, 2);
if ($eth =~ /^[\w]+[\d]/) {
$persistence_array[$i] = $eth;
$persistence_hash{$eth} = $i++;
}
}
}
close FILE;
$num_persistent = $i;
}
# print out list of ethernet devices to file
sub commit_persistent {
my $i;
my $eth;
open(PF, ">$persistence_file");
for ($i = 0; $i < $num_persistent; $i++) {
$eth = $persistence_array[$i];
if ($eth =~ /[\w]+[\d]/) {
print(PF "$persistence_array[$i]\n");
}
}
close(PF);
}
sub delete_persistent {
my $eth = $_[0];
if (defined($persistence_hash{$eth})) {
$persistence_array[$persistence_hash{$eth}] = "";
}
}
sub add_persistent {
my $eth = $_[0];
# Is this one already in the persistence list?
if (!defined($persistence_hash{$eth})) {
$persistence_array[$num_persistent] = $eth;
$persistence_hash{$eth} = $num_persistent;
$num_persistent++;
}
}
# add new rxe device to eth if not already up
sub rxe_add {
my $eth = $_[0];
if (!($eth =~ /[\w]+[\d]/)) {
print "eth_name ($eth) looks bogus\n";
return;
}
if (!defined($rxe_names{$eth})) {
system("echo '$eth' > $parms/add");
}
if (!$no_persist) {
add_persistent($eth);
commit_persistent();
}
}
sub rxe_remove {
my $arg2 = $_[0];
my $rxe;
my $eth;
print "remove $arg2\n" if ($debug > 0);
if ($arg2 =~ /[\w]+[\d]/) {
$eth = $arg2;
$rxe = $rxe_names{$eth};
}
elsif ($arg2 =~ /rxe[0123456789]/) {
$rxe = $arg2;
$eth = $eth_names{$rxe};
}
elsif ($arg2 eq "all") {
$rxe = "all";
}
if (($rxe eq "all") || ($rxe =~ /^rxe[0123456789]/)) {
my $cmd = "echo '$rxe' > $parms/remove";
#print "$cmd\n";
system($cmd);
if (!$no_persist) {
if ($rxe eq "all") {
unlink($persistence_file);
}
elsif ($eth =~/[\w]+[\d]/) {
delete_persistent($eth);
commit_persistent();
}
else {
print "Warning: Unable to resolve ethname; "
. "instance may persist on restart\n";
}
}
}
else {
print "rxe instance $rxe not found\n";
}
}
sub get_devinfo {
my $rxe = $_[0];
my $cmd = "ibv_devinfo -d $rxe";
return `$cmd`;
}
# allow unsupported modules to load in SLES11 if allowed
sub modprobe {
my $module = $_[0];
my $opts = $_[1];
my @lines;
my $line;
if ($modprobe_checked == "0") {
@lines = `modprobe -c`;
foreach $line (@lines) {
if ($line =~ /^allow_unsupported_modules *0/) {
$modprobe_opt = " --allow-unsupported-modules ";
last;
}
}
$modprobe_checked = "1";
}
if (!defined($opts)) {
$opts = "";
}
system("modprobe $modprobe_opt $module $opts");
}
# bring up rxe
sub do_start {
my $proto_str = "";
system("mkdir -p $persistence_path");
system("touch $persistence_file");
modprobe("ib_core");
modprobe("ib_uverbs");
modprobe("rdma_ucm");
modprobe("rdma_rxe");
populate_persistence();
system("udevadm control --reload");
foreach my $eth (@persistence_array) {
rxe_add($eth);
}
get_names();
foreach my $rxe (@rxe_array) {
my $stat = get_devinfo($rxe);
if ($stat =~ "PORT_DOWN") {
my $cmd = "ip link set $eth_names{$rxe} up";
system($cmd);
}
}
}
# check if argument is an integer
sub is_integer {
defined $_[0] && $_[0] =~ /^[+-]?\d+$/;
}
# remove all rxe devices and unload drivers
sub do_stop {
my $rxe;
foreach $rxe (@rxe_array) {
system("echo '$rxe' > $sys/remove");
}
if (-e $sys) {
system("rmmod rdma_rxe");
}
if (-e $sys) {
print "unable to unload drivers, reboot required\n";
}
}
sub do_debug {
my $arg2 = $_[0];
my $debugfile = "$parms/debug";
chomp($arg2);
if (!(-e "$debugfile")) {
print "Error: debug is compiled out of this rxe driver\n";
return;
}
if ($arg2 eq "on") { system("echo '31' > $debugfile"); }
elsif ($arg2 eq "off") { system("echo '0' > $debugfile"); }
elsif ($arg2 eq "0") { system("echo '0' > $debugfile"); }
elsif ($arg2 eq "") { }
elsif ($arg2 ge "0" && $arg2 le "31") {
system("echo '$arg2' > $debugfile");
}
else {
print "unrecognized debug cmd ($arg2)\n";
}
my $current = read_file($debugfile);
chomp($current);
if ($current > 0) {
print "Debug is ON ($current)\n";
}
elsif ($current == 0) {
print "Debug is OFF\n";
}
else {
print "Unrecognized debug value\n";
}
}
sub max {
my $a = $_[0];
my $b = $_[1];
return $a if ($a > $b);
return $b;
}
# show usage for rxe_cfg
sub usage {
print " Usage:\n";
print " rxe_cfg [options] start|stop|status|persistent\n";
print " rxe_cfg debug on|off|<num>\n";
print " rxe_cfg [-n] add <ndev>\n";
print " rxe_cfg [-n] remove <ndev>|<rdev>\n";
print "\n";
print " <ndev> = network device e.g. eth3\n";
print " <rdev> = rdma device e.g. rxe1\n";
print "\n";
print " Options:\n";
print " -h: print this usage information\n";
print " -n: do not make the configuration action persistent\n";
print " -v: print additional debug output\n";
print " -l: show status for interfaces with link up\n";
print " -p <num>: (start command only) - set ethertype\n";
}
sub main {
GetOptions(
"-h" => \$help,
"--help" => \$help,
"-n" => \$no_persist,
"-v:+" => \$debug,
"-f" => \$force,
"-l" => \$linkonly,
);
my $arg1 = $ARGV[0];
my $arg2 = $ARGV[1];
my $arg3 = $ARGV[2];
# status is the default
if (!defined($arg1) || ($arg1 =~ /status/)) {
do_status($arg2);
exit;
}
if ($help) {
usage();
exit;
}
# stuff that does not require modules to be loaded
if ($arg1 eq "help") { usage(); exit; }
elsif ($arg1 eq "start") { do_start(); do_status(); exit; }
elsif ($arg1 eq "persistent") { system("cat $persistence_file"); exit; }
# can't do much else, bail if modules aren't loaded
if (check_module_status()) {
exit;
}
# create persistence file if necessary
make_path($persistence_path);
if (!(-e $persistence_file)) {
`touch $persistence_file`;
}
# Get full context of the configuration
populate_persistence();
get_names();
get_dev_info();
# Stuff that requires the rdma_rxe module to be loaded
if ($arg1 eq "stop") { do_stop(); exit; }
elsif ($arg1 eq "debug") { do_debug($arg2); exit; }
elsif ($arg1 eq "add") { rxe_add($arg2); exit; }
elsif ($arg1 eq "remove") { rxe_remove($arg2); exit; }
elsif ($arg1 eq "help") { usage(); exit; }
}
main();
exit;

View File

@ -1,6 +1,6 @@
Name: rdma-core
Version: 22.3
Release: 1%{?dist}
Version: 46.0
Release: 1%{?dist}.1
Summary: RDMA core userspace libraries and daemons
# Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license
@ -11,14 +11,23 @@ License: GPLv2 or BSD
Url: https://github.com/linux-rdma/rdma-core
Source: https://github.com/linux-rdma/rdma-core/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: ibdev2netdev
Patch1: redhat-kernel-init-libi40iw-no-longer-tech-preview.patch
Patch2: i40iw-autoload-breaks-suspend.patch
Patch3: 0001-Update-kernel-headers.patch
Patch4: 0002-bnxt_re-lib-Enable-Broadcom-s-57500-RoCE-adapter.patch
Patch5: 0003-mlx5-Add-new-device-IDs.patch
# Upstream had removed rxe_cfg from upstream git repo. RHEL-8.X has
# to keep it for backward compatibility. 'rxe_cfg' and 'rxe_cfg.8.gz'
# are extracted from libibverbs-26.0-8.el8 .
Source2: rxe_cfg
Source3: rxe_cfg.8.gz
# RHEL specific patch for OPA ibacm plugin
Patch300: 0001-ibacm-acm.c-load-plugin-while-it-is-soft-link.patch
Patch301: 0002-systemd-drop-Protect-options-not-supported-in-RHEL-8.patch
Patch9000: 0003-CMakeLists-disable-providers-that-were-not-enabled-i.patch
Patch9998: 9998-kernel-boot-Do-not-perform-device-rename-on-OPA-devi.patch
Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch
# Do not build static libs by default.
%define with_static %{?_with_static: 1} %{?!_with_static: 0}
# 32-bit arm is missing required arch-specific memory barriers,
ExcludeArch: %{arm}
BuildRequires: binutils
BuildRequires: cmake >= 2.8.11
BuildRequires: gcc
@ -26,17 +35,32 @@ BuildRequires: libudev-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-route-3.0)
BuildRequires: python3-docutils
%ifarch %{valgrind_arches}
BuildRequires: valgrind-devel
%endif
BuildRequires: systemd
BuildRequires: python3-devel
BuildRequires: sed
Requires: dracut, kmod, systemd
%if 0%{?fedora} >= 24
Requires: systemd-udev
BuildRequires: systemd-devel
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8
%define with_pyverbs %{?_with_pyverbs: 1} %{?!_with_pyverbs: %{?!_without_pyverbs: 1} %{?_without_pyverbs: 0}}
%else
%define with_pyverbs %{?_with_pyverbs: 1} %{?!_with_pyverbs: 0}
%endif
%if %{with_pyverbs}
BuildRequires: python3-devel
BuildRequires: python3-Cython
%else
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
BuildRequires: python3
%else
BuildRequires: python
%endif
%endif
BuildRequires: sed
BuildRequires: perl-generators
Requires: pciutils
# Red Hat/Fedora previously shipped redhat/ as a stand-alone
# package called 'rdma', which we're supplanting here.
Provides: rdma = %{version}-%{release}
@ -45,13 +69,10 @@ Provides: rdma-ndd = %{version}-%{release}
Obsoletes: rdma-ndd < %{version}-%{release}
# the ndd utility moved from infiniband-diags to rdma-core
Conflicts: infiniband-diags <= 1.6.7
Requires: pciutils
# 32-bit arm is missing required arch-specific memory barriers,
ExcludeArch: %{arm}
# Since we recommend developers use Ninja, so should packagers, for consistency.
%define CMAKE_FLAGS %{nil}
%if 0%{?fedora} >= 23
%if 0%{?fedora} >= 23 || 0%{?rhel} >= 8
# Ninja was introduced in FC23
BuildRequires: ninja-build
%define CMAKE_FLAGS -GNinja
@ -60,59 +81,72 @@ BuildRequires: ninja-build
%else
# Fallback to make otherwise
BuildRequires: make
%define make_jobs make -v %{?_smp_mflags}
%define make_jobs make VERBOSE=1 %{?_smp_mflags}
%define cmake_install DESTDIR=%{buildroot} make install
%endif
BuildRequires: pandoc
%description
RDMA core userspace infrastructure and documentation, including kernel
driver-specific modprobe override configs, IPoIB network scripts,
dracut rules, and the rdma-ndd utility.
RDMA core userspace infrastructure and documentation, including initialization
scripts, kernel driver-specific modprobe override configs, IPoIB network
scripts, dracut rules, and the rdma-ndd utility.
%package devel
Summary: RDMA core development libraries and headers
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libibverbs = %{version}-%{release}
Requires: libibverbs%{?_isa} = %{version}-%{release}
Provides: libibverbs-devel = %{version}-%{release}
Obsoletes: libibverbs-devel < %{version}-%{release}
Provides: libibverbs-devel-static = %{version}-%{release}
Obsoletes: libibverbs-devel-static < %{version}-%{release}
Requires: libibumad = %{version}-%{release}
Requires: libibumad%{?_isa} = %{version}-%{release}
Provides: libibumad-devel = %{version}-%{release}
Obsoletes: libibumad-devel < %{version}-%{release}
Provides: libibumad-static = %{version}-%{release}
Obsoletes: libibumad-static < %{version}-%{release}
Requires: librdmacm = %{version}-%{release}
Requires: librdmacm%{?_isa} = %{version}-%{release}
Provides: librdmacm-devel = %{version}-%{release}
Obsoletes: librdmacm-devel < %{version}-%{release}
Provides: librdmacm-static = %{version}-%{release}
Obsoletes: librdmacm-static < %{version}-%{release}
Requires: ibacm = %{version}-%{release}
Provides: ibacm-devel = %{version}-%{release}
Obsoletes: ibacm-devel < %{version}-%{release}
Provides: libcxgb4-static = %{version}-%{release}
Obsoletes: libcxgb4-static < %{version}-%{release}
Provides: libhfi1-static = %{version}-%{release}
Obsoletes: libhfi1-static < %{version}-%{release}
Provides: libmlx4-static = %{version}-%{release}
Obsoletes: libmlx4-static < %{version}-%{release}
Provides: libmlx5-static = %{version}-%{release}
Obsoletes: libmlx5-static < %{version}-%{release}
Provides: libi40iw-devel-static = %{version}-%{release}
Obsoletes: libi40iw-devel-static < %{version}-%{release}
Requires: infiniband-diags%{?_isa} = %{version}-%{release}
Provides: infiniband-diags-devel = %{version}-%{release}
Obsoletes: infiniband-diags-devel < %{version}-%{release}
Provides: libibmad-devel = %{version}-%{release}
Obsoletes: libibmad-devel < %{version}-%{release}
%if %{with_static}
# Since our pkg-config files include private references to these packages they
# need to have their .pc files installed too, even for dynamic linking, or
# pkg-config breaks.
BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-route-3.0)
%endif
%description devel
RDMA core development libraries and headers.
%package -n infiniband-diags
Summary: InfiniBand Diagnostic Tools
Requires: libibumad%{?_isa} = %{version}-%{release}
Provides: perl(IBswcountlimits)
Provides: libibmad = %{version}-%{release}
Obsoletes: libibmad < %{version}-%{release}
Obsoletes: openib-diags < 1.3
%description -n infiniband-diags
This package provides IB diagnostic programs and scripts needed to diagnose an
IB subnet. infiniband-diags now also provides libibmad. libibmad provides
low layer IB functions for use by the IB diagnostic and management
programs. These include MAD, SA, SMP, and other basic IB functions.
%package -n libibverbs
Summary: A library and drivers for direct userspace use of RDMA (InfiniBand/iWARP/RoCE) hardware
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: libcxgb4 = %{version}-%{release}
Obsoletes: libcxgb4 < %{version}-%{release}
Provides: libefa = %{version}-%{release}
Obsoletes: libefa < %{version}-%{release}
Provides: libhfi1 = %{version}-%{release}
Obsoletes: libhfi1 < %{version}-%{release}
Provides: libi40iw = %{version}-%{release}
Obsoletes: libi40iw < %{version}-%{release}
Provides: libirdma = %{version}-%{release}
Obsoletes: libirdma < %{version}-%{release}
Provides: libmana = %{version}-%{release}
Obsoletes: libmana < %{version}-%{release}
Provides: libmlx4 = %{version}-%{release}
Obsoletes: libmlx4 < %{version}-%{release}
%ifnarch s390
@ -121,8 +155,6 @@ Obsoletes: libmlx5 < %{version}-%{release}
%endif
Provides: librxe = %{version}-%{release}
Obsoletes: librxe < %{version}-%{release}
Provides: libusnic_verbs = %{version}-%{release}
Obsoletes: libusnic_verbs < %{version}-%{release}
%description -n libibverbs
libibverbs is a library that allows userspace processes to use RDMA
@ -135,18 +167,24 @@ Device-specific plug-in ibverbs userspace drivers are included:
- libbxnt_re: Broadcom NetXtreme-E RoCE HCA
- libcxgb4: Chelsio T4 iWARP HCA
- libefa: Amazon Elastic Fabric Adapter
- libhfi1: Intel Omni-Path HFI
- libhns: HiSilicon Hip06 SoC
- libi40iw: Intel Ethernet Connection X722 RDMA
- libirdma: Intel Ethernet Connection RDMA
- libmana: Microsoft Azure Network Adapter
- libmlx4: Mellanox ConnectX-3 InfiniBand HCA
- libmlx5: Mellanox Connect-IB/X-4+ InfiniBand HCA
- libqedr: QLogic QL4xxx RoCE HCA
- librxe: A software implementation of the RoCE protocol
- libsiw: A software implementation of the iWarp protocol
- libvmw_pvrdma: VMware paravirtual RDMA device
%package -n libibverbs-utils
Summary: Examples for the libibverbs library
Requires: libibverbs%{?_isa} = %{version}-%{release}
# rxe_cfg uses commands provided by these packages
Requires: iproute
Requires: ethtool
%description -n libibverbs-utils
Useful libibverbs example programs such as ibv_devinfo, which
@ -155,7 +193,6 @@ displays information about RDMA devices.
%package -n ibacm
Summary: InfiniBand Communication Manager Assistant
%{?systemd_requires}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libibumad%{?_isa} = %{version}-%{release}
Requires: libibverbs%{?_isa} = %{version}-%{release}
@ -172,7 +209,6 @@ library knows how to talk directly to the ibacm daemon to retrieve data.
%package -n iwpmd
Summary: iWarp Port Mapper userspace daemon
%{?systemd_requires}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n iwpmd
iwpmd provides a userspace service for iWarp drivers to claim
@ -180,7 +216,6 @@ tcp ports through the standard socket interface.
%package -n libibumad
Summary: OpenFabrics Alliance InfiniBand umad (userspace management datagram) library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n libibumad
libibumad provides the userspace management datagram (umad) library
@ -189,11 +224,10 @@ are used by the IB diagnostic and management tools, including OpenSM.
%package -n librdmacm
Summary: Userspace RDMA Connection Manager
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libibverbs%{?_isa} = %{version}-%{release}
%description -n librdmacm
librdmacm provides a userspace RDMA Communication Managment API.
librdmacm provides a userspace RDMA Communication Management API.
%package -n librdmacm-utils
Summary: Examples for the librdmacm library
@ -209,7 +243,6 @@ Obsoletes: srptools <= 1.0.3
Provides: srptools = %{version}-%{release}
Obsoletes: openib-srptools <= 0.0.6
%{?systemd_requires}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libibumad%{?_isa} = %{version}-%{release}
Requires: libibverbs%{?_isa} = %{version}-%{release}
@ -217,13 +250,29 @@ Requires: libibverbs%{?_isa} = %{version}-%{release}
In conjunction with the kernel ib_srp driver, srp_daemon allows you to
discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand.
%if %{with_pyverbs}
%package -n python3-pyverbs
Summary: Python3 API over IB verbs
%{?python_provide:%python_provide python3-pyverbs}
Requires: librdmacm%{?_isa} = %{version}-%{release}
Requires: libibverbs%{?_isa} = %{version}-%{release}
%description -n python3-pyverbs
Pyverbs is a Cython-based Python API over libibverbs, providing an
easy, object-oriented access to IB verbs.
%endif
%prep
%setup
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%setup -q
%patch300 -p1
%patch301 -p1
%if 0%{?fedora}
%patch9998 -p1
%endif
%if 0%{?rhel}
%patch9000 -p1
%patch9999 -p1
%endif
%build
@ -251,12 +300,23 @@ discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand.
-DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{_unitdir} \
-DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \
-DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} \
-DCMAKE_INSTALL_UDEV_RULESDIR:PATH=%{_udevrulesdir} \
-DCMAKE_INSTALL_PERLDIR:PATH=%{perl_vendorlib} \
-DENABLE_IBDIAGS_COMPAT:BOOL=False \
%if %{with_static}
-DENABLE_STATIC=1 \
%endif
%{EXTRA_CMAKE_FLAGS}
%{EXTRA_CMAKE_FLAGS} \
%if %{defined __python3}
-DPYTHON_EXECUTABLE:PATH=%{__python3} \
-DCMAKE_INSTALL_PYTHON_ARCH_LIB:PATH=%{python3_sitearch} \
%endif
%if %{with_pyverbs}
-DNO_PYVERBS=0
%else
-DNO_PYVERBS=1
%endif
%make_jobs
%install
@ -267,25 +327,23 @@ mkdir -p %{buildroot}/%{_sysconfdir}/rdma
# Red Hat specific glue
%global dracutlibdir %{_prefix}/lib/dracut
%global sysmodprobedir %{_prefix}/lib/modprobe.d
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d
mkdir -p %{buildroot}%{_libexecdir}
mkdir -p %{buildroot}%{_udevrulesdir}
mkdir -p %{buildroot}%{dracutlibdir}/modules.d/05rdma
mkdir -p %{buildroot}%{sysmodprobedir}
install -D -m0644 redhat/rdma.conf %{buildroot}/%{_sysconfdir}/rdma/rdma.conf
install -D -m0644 redhat/rdma.sriov-vfs %{buildroot}/%{_sysconfdir}/rdma/sriov-vfs
install -D -m0644 redhat/rdma.mlx4.conf %{buildroot}/%{_sysconfdir}/rdma/mlx4.conf
install -D -m0644 redhat/rdma.service %{buildroot}%{_unitdir}/rdma.service
install -D -m0755 redhat/rdma.modules-setup.sh %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh
install -D -m0644 redhat/rdma.udev-rules %{buildroot}%{_udevrulesdir}/98-rdma.rules
install -D -m0644 redhat/rdma.mlx4.sys.modprobe %{buildroot}%{sysmodprobedir}/libmlx4.conf
install -D -m0755 redhat/rdma.kernel-init %{buildroot}%{_libexecdir}/rdma-init-kernel
install -D -m0755 redhat/rdma.sriov-init %{buildroot}%{_libexecdir}/rdma-set-sriov-vf
install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh
rm -f %{buildroot}%{_sysconfdir}/rdma/modules/rdma.conf
install -D -m0644 redhat/rdma.conf %{buildroot}%{_sysconfdir}/rdma/modules/rdma.conf
# ibdev2netdev helper script
install -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/
# rxe_cfg
install -D -m0755 %{SOURCE2} %{buildroot}%{_bindir}/
install -D -m0644 %{SOURCE3} %{buildroot}%{_mandir}/man8/
# ibacm
bin/ib_acme -D . -O
# multi-lib conflict resolution hacks (bug 1429362)
@ -296,26 +354,18 @@ install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/
# Delete the package's init.d scripts
rm -rf %{buildroot}/%{_initrddir}/
# Remove ibverbs provider libs we don't support
rm -f %{buildroot}/%{_libdir}/libibverbs/libcxgb3-rdmav*.so
rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/cxgb3.driver
rm -f %{buildroot}/%{_libdir}/libibverbs/libocrdma-rdmav*.so
rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/ocrdma.driver
rm -f %{buildroot}/%{_libdir}/libibverbs/libnes-rdmav*.so
rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/nes.driver
rm -f %{buildroot}/%{_libdir}/libibverbs/libmthca-rdmav*.so
rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/mthca.driver
rm -f %{buildroot}/%{_libdir}/libibverbs/libipathverbs-rdmav*.so
rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/ipathverbs.driver
%ldconfig_scriptlets -n libibverbs
%post -n libibverbs -p /sbin/ldconfig
%postun -n libibverbs -p /sbin/ldconfig
%ldconfig_scriptlets -n libibumad
%post -n libibumad -p /sbin/ldconfig
%postun -n libibumad -p /sbin/ldconfig
%ldconfig_scriptlets -n librdmacm
%post -n librdmacm -p /sbin/ldconfig
%postun -n librdmacm -p /sbin/ldconfig
%post -n rdma-core
if [ -x /sbin/udevadm ]; then
/sbin/udevadm trigger --subsystem-match=infiniband --action=change || true
/sbin/udevadm trigger --subsystem-match=net --action=change || true
/sbin/udevadm trigger --subsystem-match=infiniband_mad --action=change || true
fi
%post -n ibacm
%systemd_post ibacm.service
@ -340,34 +390,48 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/ipathverbs.driver
%files
%dir %{_sysconfdir}/rdma
%dir %{_docdir}/%{name}-%{version}
%doc %{_docdir}/%{name}-%{version}/README.md
%doc %{_docdir}/%{name}-%{version}/udev.md
%config(noreplace) %{_sysconfdir}/rdma/*
%config(noreplace) %{_sysconfdir}/udev/rules.d/*
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/70-persistent-ipoib.rules
%doc %{_docdir}/%{name}/README.md
%doc %{_docdir}/%{name}/rxe.md
%doc %{_docdir}/%{name}/udev.md
%doc %{_docdir}/%{name}/tag_matching.md
%config(noreplace) %{_sysconfdir}/rdma/mlx4.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/infiniband.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/iwarp.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/opa.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/rdma.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/roce.conf
%dir %{_sysconfdir}/modprobe.d
%ifnarch s390
%config(noreplace) %{_sysconfdir}/modprobe.d/mlx4.conf
%endif
%config(noreplace) %{_sysconfdir}/modprobe.d/truescale.conf
%{_unitdir}/rdma-hw.target
%{_unitdir}/rdma-load-modules@.service
%{_unitdir}/rdma.service
%dir %{dracutlibdir}
%dir %{dracutlibdir}/modules.d
%dir %{dracutlibdir}/modules.d/05rdma
%{dracutlibdir}/modules.d/05rdma/module-setup.sh
%{_udevrulesdir}/*
%dir %{_udevrulesdir}
%{_udevrulesdir}/../rdma_rename
%{_udevrulesdir}/60-rdma-ndd.rules
%{_udevrulesdir}/60-rdma-persistent-naming.rules
%{_udevrulesdir}/75-rdma-description.rules
%{_udevrulesdir}/90-rdma-hw-modules.rules
%{_udevrulesdir}/90-rdma-ulp-modules.rules
%{_udevrulesdir}/90-rdma-umad.rules
%dir %{sysmodprobedir}
%{sysmodprobedir}/libmlx4.conf
%{_libexecdir}/rdma-init-kernel
%{_libexecdir}/rdma-set-sriov-vf
%{_libexecdir}/mlx4-setup.sh
%{_libexecdir}/truescale-serdes.cmds
%{_sbindir}/rdma-ndd
%{_bindir}/ibdev2netdev
%{_unitdir}/rdma-ndd.service
%{_mandir}/man7/rxe*
%{_mandir}/man8/rdma-ndd.*
%license COPYING.*
%files devel
%doc %{_docdir}/%{name}-%{version}/MAINTAINERS
%doc %{_docdir}/%{name}/MAINTAINERS
%dir %{_includedir}/infiniband
%dir %{_includedir}/rdma
%{_includedir}/infiniband/*
@ -377,60 +441,131 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/ipathverbs.driver
%endif
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/efadv*
%{_mandir}/man3/ibv_*
%{_mandir}/man3/rdma*
%{_mandir}/man3/umad*
%{_mandir}/man3/*_to_ibv_rate.*
%ifnarch s390
%{_mandir}/man3/mlx4dv*
%{_mandir}/man3/mlx5dv*
%{_mandir}/man7/mlx5dv*
%endif
%{_mandir}/man7/rdma_cm.*
%ifnarch s390
%{_mandir}/man3/mlx5dv*
%{_mandir}/man3/mlx4dv*
%{_mandir}/man3/manadv*
%{_mandir}/man7/efadv*
%{_mandir}/man7/mlx5dv*
%{_mandir}/man7/mlx4dv*
%{_mandir}/man7/manadv*
%endif
%{_mandir}/man3/ibnd_*
%files -n infiniband-diags
%{_sbindir}/ibaddr
%{_mandir}/man8/ibaddr*
%{_sbindir}/ibnetdiscover
%{_mandir}/man8/ibnetdiscover*
%{_sbindir}/ibping
%{_mandir}/man8/ibping*
%{_sbindir}/ibportstate
%{_mandir}/man8/ibportstate*
%{_sbindir}/ibroute
%{_mandir}/man8/ibroute.*
%{_sbindir}/ibstat
%{_mandir}/man8/ibstat.*
%{_sbindir}/ibsysstat
%{_mandir}/man8/ibsysstat*
%{_sbindir}/ibtracert
%{_mandir}/man8/ibtracert*
%{_sbindir}/perfquery
%{_mandir}/man8/perfquery*
%{_sbindir}/sminfo
%{_mandir}/man8/sminfo*
%{_sbindir}/smpdump
%{_mandir}/man8/smpdump*
%{_sbindir}/smpquery
%{_mandir}/man8/smpquery*
%{_sbindir}/saquery
%{_mandir}/man8/saquery*
%{_sbindir}/vendstat
%{_mandir}/man8/vendstat*
%{_sbindir}/iblinkinfo
%{_mandir}/man8/iblinkinfo*
%{_sbindir}/ibqueryerrors
%{_mandir}/man8/ibqueryerrors*
%{_sbindir}/ibcacheedit
%{_mandir}/man8/ibcacheedit*
%{_sbindir}/ibccquery
%{_mandir}/man8/ibccquery*
%{_sbindir}/ibccconfig
%{_mandir}/man8/ibccconfig*
%{_sbindir}/dump_fts
%{_mandir}/man8/dump_fts*
%{_sbindir}/ibhosts
%{_mandir}/man8/ibhosts*
%{_sbindir}/ibswitches
%{_mandir}/man8/ibswitches*
%{_sbindir}/ibnodes
%{_mandir}/man8/ibnodes*
%{_sbindir}/ibrouters
%{_mandir}/man8/ibrouters*
%{_sbindir}/ibfindnodesusing.pl
%{_mandir}/man8/ibfindnodesusing*
%{_sbindir}/ibidsverify.pl
%{_mandir}/man8/ibidsverify*
%{_sbindir}/check_lft_balance.pl
%{_mandir}/man8/check_lft_balance*
%{_sbindir}/dump_lfts.sh
%{_mandir}/man8/dump_lfts*
%{_sbindir}/dump_mfts.sh
%{_mandir}/man8/dump_mfts*
%{_sbindir}/ibstatus
%{_mandir}/man8/ibstatus*
%{_mandir}/man8/infiniband-diags*
%{_libdir}/libibmad*.so.*
%{_libdir}/libibnetdisc*.so.*
%{perl_vendorlib}/IBswcountlimits.pm
%config(noreplace) %{_sysconfdir}/infiniband-diags/error_thresholds
%config(noreplace) %{_sysconfdir}/infiniband-diags/ibdiag.conf
%files -n libibverbs
%dir %{_sysconfdir}/libibverbs.d
%dir %{_libdir}/libibverbs
%{_libdir}/libefa.so.*
%{_libdir}/libibverbs*.so.*
%{_libdir}/libibverbs/*.so
%ifnarch s390
%{_libdir}/libmlx4.so.*
%{_libdir}/libmlx5.so.*
%{_libdir}/libmlx4.so.*
%{_libdir}/libmana.so.*
%endif
%config(noreplace) %{_sysconfdir}/libibverbs.d/*.driver
%doc %{_docdir}/%{name}-%{version}/libibverbs.md
%doc %{_docdir}/%{name}-%{version}/rxe.md
%doc %{_docdir}/%{name}-%{version}/tag_matching.md
%{_bindir}/rxe_cfg
%{_mandir}/man7/rxe*
%ifnarch s390
%{_mandir}/man7/mlx4dv*
%{_mandir}/man7/mlx5dv*
%endif
%{_mandir}/man8/rxe*
%doc %{_docdir}/%{name}/libibverbs.md
%files -n libibverbs-utils
%{_bindir}/ibv_*
%{_mandir}/man1/ibv_*
%{_bindir}/rxe_cfg
%{_mandir}/man8/rxe*
%files -n ibacm
%config(noreplace) %{_sysconfdir}/rdma/ibacm_opts.cfg
%{_bindir}/ib_acme
%{_sbindir}/ibacm
%{_mandir}/man1/ibacm.*
%{_mandir}/man1/ib_acme.*
%{_mandir}/man7/ibacm.*
%{_mandir}/man7/ibacm_prov.*
%{_mandir}/man8/ibacm.*
%{_unitdir}/ibacm.service
%{_unitdir}/ibacm.socket
%dir %{_libdir}/ibacm
%{_libdir}/ibacm/*
%doc %{_docdir}/%{name}-%{version}/ibacm.md
%doc %{_docdir}/%{name}/ibacm.md
%files -n iwpmd
%{_sbindir}/iwpmd
%{_unitdir}/iwpmd.service
%config(noreplace) %{_sysconfdir}/rdma/modules/iwpmd.conf
%config(noreplace) %{_sysconfdir}/iwpmd.conf
%{_udevrulesdir}/90-iwpmd.rules
%{_mandir}/man8/iwpmd.*
%{_mandir}/man5/iwpmd.*
@ -440,8 +575,8 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/ipathverbs.driver
%files -n librdmacm
%{_libdir}/librdmacm*.so.*
%dir %{_libdir}/rsocket
%{_libdir}/rsocket/librspreload.so*
%doc %{_docdir}/%{name}-%{version}/librdmacm.md
%{_libdir}/rsocket/*.so*
%doc %{_docdir}/%{name}/librdmacm.md
%{_mandir}/man7/rsocket.*
%files -n librdmacm-utils
@ -474,6 +609,7 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/ipathverbs.driver
%files -n srp_daemon
%config(noreplace) %{_sysconfdir}/srp_daemon.conf
%config(noreplace) %{_sysconfdir}/rdma/modules/srp_daemon.conf
%{_libexecdir}/srp_daemon/start_on_all_ports
%{_unitdir}/srp_daemon.service
%{_unitdir}/srp_daemon_port@.service
@ -481,13 +617,125 @@ rm -f %{buildroot}/%{_sysconfdir}/libibverbs.d/ipathverbs.driver
%{_sbindir}/srp_daemon
%{_sbindir}/srp_daemon.sh
%{_sbindir}/run_srp_daemon
%{_mandir}/man1/ibsrpdm.1*
%{_mandir}/man1/srp_daemon.1*
%{_udevrulesdir}/60-srp_daemon.rules
%{_mandir}/man5/srp_daemon.service.5*
%{_mandir}/man5/srp_daemon_port@.service.5*
%doc %{_docdir}/%{name}-%{version}/ibsrpdm.md
%{_mandir}/man8/ibsrpdm.8*
%{_mandir}/man8/srp_daemon.8*
%doc %{_docdir}/%{name}/ibsrpdm.md
%if %{with_pyverbs}
%files -n python3-pyverbs
%{python3_sitearch}/pyverbs
%{_docdir}/%{name}/tests/*.py
%endif
%changelog
* Tue May 30 2023 Kamal Heib <kheib@redhat.com> - 46.0-1.1
- Add gating tests
- Resolves: rhbz#2170066
* Thu May 25 2023 Kamal Heib <kheib@redhat.com> - 46.0-1
- Rebase to upstream release v46.0
- Resolves: rhbz#2170066, rhbz#2209685, rhbz#2159635, rhbz#2167517
* Wed Feb 08 2023 Michal Schmidt <mschmidt@redhat.com> - 44.0-2.1
- Do not use unsupported Protect* options in systemd unit files.
- Resolves: rhbz#2141462
* Wed Feb 08 2023 Michal Schmidt <mschmidt@redhat.com> - 44.0-2
- Update to upstream release v44.0
- Resolves: rhbz#2110934, rhbz#2112931, rhbz#2142691
* Fri Aug 05 2022 Michal Schmidt <mschmidt@redhat.com> - 41.0-1
- Update to upstream release v41.0
- Resolves: rhbz#2049518
* Thu Jan 06 2022 Honggang Li <honli@redhat.com> - 37.2-1
- Update to upstream v37.2 release for fixes
- Resolves: bz2008509, bz2024865, bz1915555
* Tue Nov 09 2021 Honggang Li <honli@redhat.com> - 37.1-1
- Update to upstream v37.1 release for features and fixes
- Resolves: bz1982200, bz1990120, bz1982131
* Fri May 14 2021 Honggang Li <honli@redhat.com> - 35.0-1
- Update to upstream v35 release for features and fixes
- Resolves: bz1915311
* Thu Jan 28 2021 Honggang Li <honli@redhat.com> - 32.0-4
- Update to upstream stable release v32.1
- Fix mlx5 pyverbs CQ test
- Resolves: bz1915745, bz1907377
* Tue Dec 22 2020 Honggang Li <honli@redhat.com> - 32.0-3
- libqedr: Set XRC functions only in RoCE mode
- Resolves: bz1894516
* Tue Dec 08 2020 Honggang Li <honli@redhat.com> - 32.0-2
- Backport bug fixes applied after upstream v32.0
- Resolves: bz1902613, bz1875265
* Tue Nov 03 2020 Honggang Li <honli@redhat.com> - 32.0-1
- Update to upstream v32 release for features and fixes
- Support Amazon Elastic Fabric Adapter
- Enable pyverbs
- Add a check for udevadm in the specfile
- Resolves: bz1851721, bz1856076, bz1887396, bz1868804
* Tue Jun 09 2020 Honggang Li <honli@redhat.com> - 29.0-3
- BuildRequires perl-generators
- Backport upstream stable-v29 commits
- Resolves: bz1845420
* Mon May 18 2020 Honggang Li <honli@redhat.com> - 29.0-2
- Suppress ibdev2netdev warning messgae
- Unversioned documentation directory
- Resolves: bz1794904, bz1824853
* Tue Apr 14 2020 Honggang Li <honli@redhat.com> - 29.0-1
- Update to upstream v29 release for features and fixes
- Resolves: bz1790624
* Fri Feb 07 2020 Honggang Li <honli@redhat.com> - 26.0-8
- Fix an ibacm segfault issue for dual port HCA support IB and Ethernet
- Resolves: bz1793736
* Tue Dec 17 2019 Honggang Li <honli@redhat.com> - 26.0-7
- Build with Ninja.
- Resolves: bz1783254
* Fri Dec 13 2019 Honggang Li <honli@redhat.com> - 26.0-6
- Remove dangling symlink
- Resolves: bz1782828
* Wed Dec 11 2019 Honggang Li <honli@redhat.com> - 26.0-5
- Remove EFA driver
- Fix rpm dependency issue
- Resolves: bz1781454, bz1781457
* Mon Dec 09 2019 Honggang Li <honli@redhat.com> - 26.0-4
- libbnxt_re support for some new device ids and generation id
- Resolves: bz1779948
* Tue Nov 19 2019 Jarod Wilson <jarod@redhat.com> - 26.0-3
- Make rdma-core-devel Obsoletes infiniband-diags due to man3/ibnd_*
- Related: rhbz#1722257
* Thu Nov 14 2019 Jarod Wilson <jarod@redhat.com> - 26.0-2
- Add Obsoletes/Provides pair for infiniband-diags-devel
- Pull in upstream stable-v26 branch patches
- Fix %%postun scriptlet failures by removing superfluous -p options
- Add new BuildRequires: on pandoc
- Related: rhbz#1722257
* Thu Nov 14 2019 Jarod Wilson <jarod@redhat.com> - 26.0-1
- Update to upstream v26 release for features and fixes
- Resolves: rhbz#1722257
* Tue Jul 23 2019 Jarod Wilson <jarod@redhat.com> - 24.0-1
- Update to upstream v24 release for features and fixes
* Mon Jun 24 2019 Jarod Wilson <jarod@redhat.com> - 22.3-1
- Update to upstream v22.3 stable release for fixes
- Enable support for Broadcom 57500 hardware