import UBI rdma-core-61.0-1.el10

This commit is contained in:
AlmaLinux RelEng Bot 2026-05-19 18:40:19 -04:00
parent d356d88bc5
commit 8a3565f692
5 changed files with 13 additions and 144 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
rdma-core-57.0.tar.gz
rdma-core-61.0.tar.gz

View File

@ -1,89 +0,0 @@
From a9eb7409fb0b6af5dc54ae222286926b6a028ef0 Mon Sep 17 00:00:00 2001
From: Edward Srouji <edwards@nvidia.com>
Date: Tue, 4 Mar 2025 16:02:35 +0200
Subject: [PATCH] tests: Ensure graceful resource cleaning
A SEGFAULT was observed recently on some environments with
python 3.12.X.
To work around the issue and ensure that python garbage collector exiting
gracefully, a new decorator was added that catches SkipTest unittest
exceptions and closes the context and its underlying resources.
An a example of a segmentation fault occurrence that this test fixes:
$ python3 tests/run_tests.py test_mlx5_dma_memcpy
sTraceback (most recent call last):
File "cq.pyx", line 359, in pyverbs.cq.CQEX.close
pyverbs.pyverbs_error.PyverbsRDMAError: Failed to destroy CQEX. Errno:
9, Bad file descriptor
Exception ignored in: 'pyverbs.cq.CQEX.__dealloc__'
Traceback (most recent call last):
File "cq.pyx", line 359, in pyverbs.cq.CQEX.close
pyverbs.pyverbs_error.PyverbsRDMAError: Failed to destroy CQEX. Errno:
9, Bad file descriptor
Segmentation fault (core dumped)
Signed-off-by: Edward Srouji <edwards@nvidia.com>
---
tests/base.py | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/tests/base.py b/tests/base.py
index 2738714612ec..c6ffa1beca1a 100644
--- a/tests/base.py
+++ b/tests/base.py
@@ -3,6 +3,7 @@
import multiprocessing as mp
import subprocess
+import functools
import unittest
import tempfile
import random
@@ -532,7 +533,35 @@ class RDMACMBaseTest(RDMATestCase):
sys.exit(2)
-class BaseResources(object):
+def catch_skiptest(func):
+ """
+ Decorator to catch unittest.SkipTest in __init__ resource functions.
+ It gracefully closes the context and all of its underlying resources.
+ """
+ @functools.wraps(func)
+ def wrapper(self, *args, **kwargs):
+ try:
+ func(self, *args, **kwargs)
+ except unittest.SkipTest as e:
+ if hasattr(self, 'ctx') and self.ctx:
+ self.ctx.close()
+ raise e
+ return wrapper
+
+
+class SkipTestMeta(type):
+ """
+ Metaclass to automatically wrap __init__ in catch_skiptest.
+ It should only be used in resource classes, such as those inheriting from
+ BaseResources.
+ """
+ def __new__(cls, name, bases, dct):
+ if "__init__" in dct:
+ dct["__init__"] = catch_skiptest(dct["__init__"])
+ return super().__new__(cls, name, bases, dct)
+
+
+class BaseResources(object, metaclass=SkipTestMeta):
"""
BaseResources class is a base aggregator object which contains basic
resources like Context and PD. It opens a context over the given device
@@ -548,6 +577,7 @@ class BaseResources(object):
self.dev_name = dev_name
self.gid_index = gid_index
self.ib_port = ib_port
+ self.ctx = None
self.create_context()
self.create_pd()
--
2.49.0

View File

@ -1,43 +0,0 @@
From 47c3855f3b84c47cb471cbba8090a6997e07be57 Mon Sep 17 00:00:00 2001
From: Shachar Kagan <skagan@nvidia.com>
Date: Mon, 28 Apr 2025 17:18:18 +0300
Subject: [PATCH] pyverbs: Change PD object return type
Change PD object return type to be compatible with Cython 3.x
Signed-off-by: Shachar Kagan <skagan@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
---
pyverbs/pd.pyx | 2 +-
pyverbs/providers/mlx5/mlx5dv_objects.pyx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyverbs/pd.pyx b/pyverbs/pd.pyx
index 2d84e0b68d10..d8845e8a058b 100644
--- a/pyverbs/pd.pyx
+++ b/pyverbs/pd.pyx
@@ -151,7 +151,7 @@ cdef class PD(PyverbsCM):
@property
def pd(self):
- return <object>self.pd
+ return <uintptr_t>self.pd
cdef void *pd_alloc(v.ibv_pd *pd, void *pd_context, size_t size,
diff --git a/pyverbs/providers/mlx5/mlx5dv_objects.pyx b/pyverbs/providers/mlx5/mlx5dv_objects.pyx
index e7776205a150..0567e81a06e8 100644
--- a/pyverbs/providers/mlx5/mlx5dv_objects.pyx
+++ b/pyverbs/providers/mlx5/mlx5dv_objects.pyx
@@ -182,7 +182,7 @@ cdef class Mlx5DvObj(PyverbsObject):
self.dv_qp = dv_qp
if pd:
dv_pd = Mlx5DvPD()
- self.obj.pd.in_ = <v.ibv_pd*>pd.pd
+ self.obj.pd.in_ = <v.ibv_pd*><uintptr_t>pd.pd
self.obj.pd.out = &(dv_pd.dv_pd)
self.dv_pd = dv_pd
if srq:
--
2.49.0

View File

@ -2,14 +2,14 @@
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 2;
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
Name: rdma-core
Version: 57.0
Version: 61.0
Release: %autorelease
Summary: RDMA core userspace libraries and daemons
@ -20,8 +20,6 @@ Summary: RDMA core userspace libraries and daemons
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
Patch0001: 0001-tests-Ensure-graceful-resource-cleaning.patch
Patch0002: 0002-pyverbs-Change-PD-object-return-type.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}
@ -294,8 +292,6 @@ easy, object-oriented access to IB verbs.
%prep
%setup -q
%patch 0001 -p1
%patch 0002 -p1
%if 0%{?rhel}
%patch 9999 -p1
%endif
@ -355,10 +351,10 @@ mkdir -p %{buildroot}/%{_sysconfdir}/rdma
%global sysmodprobedir %{_prefix}/lib/modprobe.d
mkdir -p %{buildroot}%{_libexecdir}
mkdir -p %{buildroot}%{_udevrulesdir}
mkdir -p %{buildroot}%{dracutlibdir}/modules.d/05rdma
mkdir -p %{buildroot}%{dracutlibdir}/modules.d/50rdma
mkdir -p %{buildroot}%{sysmodprobedir}
install -D -m0644 redhat/rdma.mlx4.conf %{buildroot}/%{_sysconfdir}/rdma/mlx4.conf
install -D -m0755 redhat/rdma.modules-setup.sh %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh
install -D -m0755 kernel-boot/dracut/50rdma/module-setup.sh %{buildroot}%{dracutlibdir}/modules.d/50rdma/module-setup.sh
install -D -m0644 redhat/rdma.mlx4.sys.modprobe %{buildroot}%{sysmodprobedir}/libmlx4.conf
install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh
rm -f %{buildroot}%{_sysconfdir}/rdma/modules/rdma.conf
@ -439,8 +435,8 @@ fi
%{_unitdir}/rdma-load-modules@.service
%dir %{dracutlibdir}
%dir %{dracutlibdir}/modules.d
%dir %{dracutlibdir}/modules.d/05rdma
%{dracutlibdir}/modules.d/05rdma/module-setup.sh
%dir %{dracutlibdir}/modules.d/50rdma
%{dracutlibdir}/modules.d/50rdma/module-setup.sh
%dir %{_udevrulesdir}
%{_udevrulesdir}/../rdma_rename
%{_udevrulesdir}/60-rdma-ndd.rules
@ -455,6 +451,7 @@ fi
%{_libexecdir}/truescale-serdes.cmds
%{_sbindir}/rdma-ndd
%{_unitdir}/rdma-ndd.service
%{_sbindir}/rdma_topo
%{_mandir}/man7/rxe*
%{_mandir}/man8/rdma-ndd.*
%license COPYING.*
@ -603,6 +600,7 @@ fi
%{_libdir}/libhns.so.*
%{_libdir}/libibverbs*.so.*
%{_libdir}/libibverbs/*.so
%{_libdir}/libionic.so.*
%{_libdir}/libmana.so.*
%{_libdir}/libmlx5.so.*
%{_libdir}/libmlx4.so.*
@ -698,6 +696,9 @@ fi
%changelog
## START: Generated by rpmautospec
* Thu Jan 15 2026 Kamal Heib <kheib@redhat.com> - 61.0-1
- Rebase to upstream release 61.0
* Thu Aug 07 2025 Kamal Heib <kheib@redhat.com> - 57.0-2
- Fix pyverbs tests

View File

@ -1 +1 @@
SHA512 (rdma-core-57.0.tar.gz) = 4a904d34af6863655545fe720cc25a8800684f63c51cebb67be2058363949217903957dc925c69d41294362ccff75fb0d37f3bc31cd6f6f252a804d6713f62cf
SHA512 (rdma-core-61.0.tar.gz) = 2b1f11cd64cfe2292e8b23cbed274db4e60007569cbc41b81b931b05e85117cdd769ea129411db540ace6a73bde9b8ce5b7e4e59108242b5b540832a10396a10