From 5b7c1a0c9b1c3607e56c7fe6ac40aaad6fa6b5b4 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 3 Aug 2022 09:14:56 +0200 Subject: [PATCH] Rebase to upstream release v41.0 Resolves: rhbz#2049521 Signed-off-by: Michal Schmidt --- .gitignore | 1 + ...k-pointer-validity-while-freeing-que.patch | 41 ------------ ...ize-wr_data-when-post-a-work-request.patch | 44 ------------- ...mparing-qp_state-for-iWARP-providers.patch | 63 ------------------- rdma-core.spec | 11 ++-- sources | 2 +- 6 files changed, 6 insertions(+), 156 deletions(-) delete mode 100644 0001-bnxt_re-lib-Check-pointer-validity-while-freeing-que.patch delete mode 100644 0001-mlx5-Initialize-wr_data-when-post-a-work-request.patch delete mode 100644 0001-tests-Fix-comparing-qp_state-for-iWARP-providers.patch diff --git a/.gitignore b/.gitignore index e6cab98..6bdbad4 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /rdma-core-35.0.tar.gz /rdma-core-37.1.tar.gz /rdma-core-37.2.tar.gz +/rdma-core-41.0.tar.gz diff --git a/0001-bnxt_re-lib-Check-pointer-validity-while-freeing-que.patch b/0001-bnxt_re-lib-Check-pointer-validity-while-freeing-que.patch deleted file mode 100644 index 5e7ae39..0000000 --- a/0001-bnxt_re-lib-Check-pointer-validity-while-freeing-que.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 02fb24d24bd705822254133fa82c007ab3487af8 Mon Sep 17 00:00:00 2001 -From: Selvin Xavier -Date: Sun, 16 Jan 2022 11:10:08 -0800 -Subject: [PATCH] bnxt_re/lib: Check pointer validity while freeing queue - pointers - -qp->jrqq can be NULL in SRQ case or when accessed from error path. -Avoid segfault by adding check before accessing qp->jrqq and qp->jsqq. - -Fixes: f92837e29fd4 ("bnxt_re/lib: consolidate hwque and swque in common structure") -Signed-off-by: Selvin Xavier ---- - providers/bnxt_re/verbs.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c -index 14fb58b7..ca113537 100644 ---- a/providers/bnxt_re/verbs.c -+++ b/providers/bnxt_re/verbs.c -@@ -820,10 +820,14 @@ static int bnxt_re_check_qp_limits(struct bnxt_re_context *cntx, - - static void bnxt_re_free_queue_ptr(struct bnxt_re_qp *qp) - { -- free(qp->jrqq->hwque); -- free(qp->jrqq); -- free(qp->jsqq->hwque); -- free(qp->jsqq); -+ if (qp->jrqq) { -+ free(qp->jrqq->hwque); -+ free(qp->jrqq); -+ } -+ if (qp->jsqq) { -+ free(qp->jsqq->hwque); -+ free(qp->jsqq); -+ } - } - - static int bnxt_re_alloc_queue_ptr(struct bnxt_re_qp *qp, --- -2.31.1 - diff --git a/0001-mlx5-Initialize-wr_data-when-post-a-work-request.patch b/0001-mlx5-Initialize-wr_data-when-post-a-work-request.patch deleted file mode 100644 index 8fc4815..0000000 --- a/0001-mlx5-Initialize-wr_data-when-post-a-work-request.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 3ea45d65d42e5daf032164240abebec82e987f90 Mon Sep 17 00:00:00 2001 -From: Mark Zhang -Date: Mon, 20 Dec 2021 11:19:46 +0200 -Subject: [PATCH] mlx5: Initialize wr_data when post a work request - -[ Upstream commit 4c905646de3e75bdccada4abe9f0d273d76eaf50 ] - -With raw_wqe feature enabled, the wc opcode will be set to -IBV_WC_DRIVER2 if the wr_data is set to it. -So if wr_data is not initialized, there's a chance that it happens to be -IBV_WC_DRIVER2, then the application gets this wc opcode unexpectedly. - -Fixes: 8ff1c5c3c411 ("mlx5: Introduce mlx5dv_wr_raw_wqe builder") -Signed-off-by: Mark Zhang -Signed-off-by: Yishai Hadas -Signed-off-by: Nicolas Morey-Chaisemartin ---- - providers/mlx5/qp.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/providers/mlx5/qp.c b/providers/mlx5/qp.c -index 70c1afb2..8a99f504 100644 ---- a/providers/mlx5/qp.c -+++ b/providers/mlx5/qp.c -@@ -871,6 +871,7 @@ static inline int _mlx5_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr, - - seg += sizeof *ctrl; - size = sizeof *ctrl / 16; -+ qp->sq.wr_data[idx] = 0; - - switch (ibqp->qp_type) { - case IBV_QPT_XRC_SEND: -@@ -1251,6 +1252,8 @@ static inline void _common_wqe_init_op(struct ibv_qp_ex *ibqp, int ib_op, - mqp->sq.wr_data[idx] = IBV_WC_DRIVER1; - else if (mlx5_op == MLX5_OPCODE_MMO) - mqp->sq.wr_data[idx] = IBV_WC_DRIVER3; -+ else -+ mqp->sq.wr_data[idx] = 0; - - ctrl = mlx5_get_send_wqe(mqp, idx); - *(uint32_t *)((void *)ctrl + 8) = 0; --- -2.31.1 - diff --git a/0001-tests-Fix-comparing-qp_state-for-iWARP-providers.patch b/0001-tests-Fix-comparing-qp_state-for-iWARP-providers.patch deleted file mode 100644 index f9c7395..0000000 --- a/0001-tests-Fix-comparing-qp_state-for-iWARP-providers.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 698f2ae804767635342694d31d9590fe6ad2217e Mon Sep 17 00:00:00 2001 -From: Kamal Heib -Date: Wed, 8 Dec 2021 16:12:11 +0200 -Subject: [PATCH] tests: Fix comparing qp_state for iWARP providers. - -The initial QP state for iWARP providers is IBV_QPS_INIT (not -IBV_QPS_RESET), Change the test to handle this case. - -Signed-off-by: Kamal Heib ---- - tests/test_qp.py | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/tests/test_qp.py b/tests/test_qp.py -index b952c95e..a66f724f 100644 ---- a/tests/test_qp.py -+++ b/tests/test_qp.py -@@ -14,6 +14,7 @@ from pyverbs.pyverbs_error import PyverbsRDMAError - from pyverbs.qp import QPInitAttr, QPAttr, QP - from tests.base import PyverbsAPITestCase - import pyverbs.utils as pu -+import pyverbs.device as d - import pyverbs.enums as e - from pyverbs.pd import PD - from pyverbs.cq import CQ -@@ -177,6 +178,11 @@ class QPTest(PyverbsAPITestCase): - self.assertLessEqual(orig_cap.max_recv_sge, init_attr.cap.max_recv_sge) - self.assertLessEqual(orig_cap.max_inline_data, init_attr.cap.max_inline_data) - -+ def get_node_type(self): -+ for dev in d.get_device_list(): -+ if dev.name.decode() == self.ctx.name: -+ return dev.node_type -+ - def query_qp_common_test(self, qp_type): - with PD(self.ctx) as pd: - with CQ(self.ctx, 100, None, None, 0) as cq: -@@ -190,14 +196,20 @@ class QPTest(PyverbsAPITestCase): - caps = qia.cap - qp = self.create_qp(pd, qia, False, False, self.ib_port) - qp_attr, qp_init_attr = qp.query(e.IBV_QP_STATE | e.IBV_QP_CAP) -- self.verify_qp_attrs(caps, e.IBV_QPS_RESET, qp_init_attr, qp_attr) -+ if self.get_node_type() == e.IBV_NODE_RNIC: -+ self.verify_qp_attrs(caps, e.IBV_QPS_INIT, qp_init_attr, qp_attr) -+ else: -+ self.verify_qp_attrs(caps, e.IBV_QPS_RESET, qp_init_attr, qp_attr) - - # Extended QP - qia = get_qp_init_attr_ex(cq, pd, self.attr, self.attr_ex, qp_type) - caps = qia.cap # Save them to verify values later - qp = self.create_qp(self.ctx, qia, True, False, self.ib_port) - qp_attr, qp_init_attr = qp.query(e.IBV_QP_STATE | e.IBV_QP_CAP) -- self.verify_qp_attrs(caps, e.IBV_QPS_RESET, qp_init_attr, qp_attr) -+ if self.get_node_type() == e.IBV_NODE_RNIC: -+ self.verify_qp_attrs(caps, e.IBV_QPS_INIT, qp_init_attr, qp_attr) -+ else: -+ self.verify_qp_attrs(caps, e.IBV_QPS_RESET, qp_init_attr, qp_attr) - - def test_query_rc_qp(self): - """ --- -2.31.1 - diff --git a/rdma-core.spec b/rdma-core.spec index 317c4f9..ebd2778 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -1,5 +1,5 @@ Name: rdma-core -Version: 37.2 +Version: 41.0 Release: 1%{?dist} Summary: RDMA core userspace libraries and daemons @@ -12,9 +12,6 @@ Url: https://github.com/linux-rdma/rdma-core Source: https://github.com/linux-rdma/rdma-core/releases/download/v%{version}/%{name}-%{version}.tar.gz Patch1: 0001-kernel-boot-Do-not-perform-device-rename-on-OPA-devi.patch Patch2: udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch -Patch3: 0001-tests-Fix-comparing-qp_state-for-iWARP-providers.patch -Patch4: 0001-bnxt_re-lib-Check-pointer-validity-while-freeing-que.patch -Patch5: 0001-mlx5-Initialize-wr_data-when-post-a-work-request.patch # Do not build static libs by default. %define with_static %{?_with_static: 1} %{?!_with_static: 0} @@ -272,9 +269,6 @@ easy, object-oriented access to IB verbs. %if 0%{?rhel} %patch2 -p1 %endif -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %build @@ -628,6 +622,9 @@ fi %endif %changelog +* Tue Aug 02 2022 Michal Schmidt - 41.0-1 +- Rebase to upstream release v41.0 + * Tue Jan 18 2022 Honggang Li - 37.2-1 - Rebase to upstream release v37.2 - Resolves: rhbz#2035043, rhbz#2034948 diff --git a/sources b/sources index 16fc42b..9f8fe57 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rdma-core-37.2.tar.gz) = 11b0670ce78bb8207e24c373abdbd950d98e590f23344496ec6fdeebb51370acda993a24ab014bf09ecf9ea23abeb486a6c4384003da2d284ad3c157d30bc431 +SHA512 (rdma-core-41.0.tar.gz) = 428d12d986effa0d58bc8b284fd5b7eab74fd484e1618cd3ebcfb1e4a142b5193fe4a7d305868d93bc44bcc591f08b81edfb0358c280111974a5335a79ae4f4c