diff --git a/SOURCES/10000-add-sxe2-rdma-core.patch b/SOURCES/10000-add-sxe2-rdma-core.patch index bdd1f51e0cbea57985a916b25c61d5aba528da12..1eb794d8cb95a5effd6dd3869bc3d654883ae4df 100755 --- a/SOURCES/10000-add-sxe2-rdma-core.patch +++ b/SOURCES/10000-add-sxe2-rdma-core.patch @@ -1,7 +1,11 @@ -diff -Naur rdma-core-48.0.bak/CMakeLists.txt rdma-core-48.0/CMakeLists.txt ---- rdma-core-48.0.bak/CMakeLists.txt 2026-05-27 16:55:02.755758364 +0800 -+++ rdma-core-48.0/CMakeLists.txt 2026-05-27 17:10:06.650938527 +0800 -@@ -733,6 +733,7 @@ +subject: [PATCH] add linkdata rdma-core driver +Signed-off-by: liujie-answer + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 86fd659..178d614 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -733,6 +733,7 @@ add_subdirectory(providers/mlx5/man) #add_subdirectory(providers/ocrdma) add_subdirectory(providers/qedr) add_subdirectory(providers/vmw_pvrdma) @@ -9,10 +13,11 @@ diff -Naur rdma-core-48.0.bak/CMakeLists.txt rdma-core-48.0/CMakeLists.txt endif() add_subdirectory(providers/hfi1verbs) -diff -Naur rdma-core-48.0.bak/kernel-headers/CMakeLists.txt rdma-core-48.0/kernel-headers/CMakeLists.txt ---- rdma-core-48.0.bak/kernel-headers/CMakeLists.txt 2026-05-27 16:55:02.750758330 +0800 -+++ rdma-core-48.0/kernel-headers/CMakeLists.txt 2026-05-27 17:28:11.530756597 +0800 -@@ -26,6 +26,7 @@ +diff --git a/kernel-headers/CMakeLists.txt b/kernel-headers/CMakeLists.txt +index 82c191c..a97462d 100644 +--- a/kernel-headers/CMakeLists.txt ++++ b/kernel-headers/CMakeLists.txt +@@ -26,6 +26,7 @@ publish_internal_headers(rdma rdma/rvt-abi.h rdma/siw-abi.h rdma/vmw_pvrdma-abi.h @@ -20,7 +25,7 @@ diff -Naur rdma-core-48.0.bak/kernel-headers/CMakeLists.txt rdma-core-48.0/kerne ) publish_internal_headers(rdma/hfi -@@ -80,6 +81,7 @@ +@@ -80,6 +81,7 @@ rdma_kernel_provider_abi( rdma/rdma_user_rxe.h rdma/siw-abi.h rdma/vmw_pvrdma-abi.h @@ -28,10 +33,11 @@ diff -Naur rdma-core-48.0.bak/kernel-headers/CMakeLists.txt rdma-core-48.0/kerne ) publish_headers(infiniband -diff -Naur rdma-core-48.0.bak/kernel-headers/rdma/ib_user_ioctl_verbs.h rdma-core-48.0/kernel-headers/rdma/ib_user_ioctl_verbs.h ---- rdma-core-48.0.bak/kernel-headers/rdma/ib_user_ioctl_verbs.h 2026-05-27 16:55:02.748758317 +0800 -+++ rdma-core-48.0/kernel-headers/rdma/ib_user_ioctl_verbs.h 2026-05-27 16:58:50.304296342 +0800 -@@ -254,6 +254,7 @@ +diff --git a/kernel-headers/rdma/ib_user_ioctl_verbs.h b/kernel-headers/rdma/ib_user_ioctl_verbs.h +index d7c5aaa..43a36ce 100644 +--- a/kernel-headers/rdma/ib_user_ioctl_verbs.h ++++ b/kernel-headers/rdma/ib_user_ioctl_verbs.h +@@ -254,6 +254,7 @@ enum rdma_driver_id { RDMA_DRIVER_SIW, RDMA_DRIVER_ERDMA, RDMA_DRIVER_MANA, @@ -39,9 +45,11 @@ diff -Naur rdma-core-48.0.bak/kernel-headers/rdma/ib_user_ioctl_verbs.h rdma-cor }; enum ib_uverbs_gid_type { -diff -Naur rdma-core-48.0.bak/kernel-headers/rdma/sxe2-abi.h rdma-core-48.0/kernel-headers/rdma/sxe2-abi.h ---- rdma-core-48.0.bak/kernel-headers/rdma/sxe2-abi.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/kernel-headers/rdma/sxe2-abi.h 2026-05-27 16:59:51.797711971 +0800 +diff --git b/kernel-headers/rdma/sxe2-abi.h b/kernel-headers/rdma/sxe2-abi.h +new file mode 100644 +index 0000000..f691d5a +--- /dev/null ++++ b/kernel-headers/rdma/sxe2-abi.h @@ -0,0 +1,117 @@ +/** + * Copyright (C) @@ -160,10 +168,11 @@ diff -Naur rdma-core-48.0.bak/kernel-headers/rdma/sxe2-abi.h rdma-core-48.0/kern +}; + +#endif -diff -Naur rdma-core-48.0.bak/libibverbs/verbs.h rdma-core-48.0/libibverbs/verbs.h ---- rdma-core-48.0.bak/libibverbs/verbs.h 2026-05-27 16:55:02.732758209 +0800 -+++ rdma-core-48.0/libibverbs/verbs.h 2026-05-27 17:06:01.496244840 +0800 -@@ -2273,6 +2273,7 @@ +diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h +index ec4926c..3a2ea5b 100644 +--- a/libibverbs/verbs.h ++++ b/libibverbs/verbs.h +@@ -2273,6 +2273,7 @@ extern const struct verbs_device_ops verbs_provider_siw; extern const struct verbs_device_ops verbs_provider_vmw_pvrdma; extern const struct verbs_device_ops verbs_provider_all; extern const struct verbs_device_ops verbs_provider_none; @@ -171,9 +180,154 @@ diff -Naur rdma-core-48.0.bak/libibverbs/verbs.h rdma-core-48.0/libibverbs/verbs void ibv_static_providers(void *unused, ...); static inline struct ibv_device **__ibv_get_device_list(int *num_devices) -diff -Naur rdma-core-48.0.bak/providers/sxe2/ah.c rdma-core-48.0/providers/sxe2/ah.c ---- rdma-core-48.0.bak/providers/sxe2/ah.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/ah.c 2026-05-27 17:08:05.581104746 +0800 +diff --git b/providers/sxe2/CMakeLists.txt b/providers/sxe2/CMakeLists.txt +new file mode 100644 +index 0000000..1212e4d +--- /dev/null ++++ b/providers/sxe2/CMakeLists.txt +@@ -0,0 +1,51 @@ ++# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) ++if(DEFINED ENV{MD_MAKEMODE}) ++ set(makemode $ENV{MD_MAKEMODE}) ++else() ++ set(makemode release) ++endif() ++if(makemode STREQUAL "release") ++ add_definitions(-DSXE2_CFG_RELEASE) ++else() ++ add_definitions(-DSXE2_CFG_DEBUG) ++endif() ++if(DEFINED ENV{ASAN}) ++ set(asan $ENV{ASAN}) ++else() ++ set(asan no) ++endif() ++if(asan STREQUAL "yes") ++ add_definitions(-DSXE2_SUPPORT_ASAN) ++endif() ++if(DEFINED ENV{INJECT}) ++ set(inject $ENV{INJECT}) ++else() ++ set(inject no) ++endif() ++if(inject STREQUAL "yes") ++ add_definitions(-DSXE2_SUPPORT_INJECT) ++endif() ++if(DEFINED ENV{IO_STAT}) ++ set(iostat $ENV{IO_STAT}) ++else() ++ set(iostat no) ++endif() ++if(iostat STREQUAL "yes") ++ add_definitions(-DSXE2_SUPPORT_IO_STAT) ++endif() ++add_compile_options(-Werror) ++rdma_provider(sxe2 ++ sxe2_common.c ++ mr.c ++ io.c ++ ah.c ++ cq.c ++ pd.c ++ qp.c ++ db.c ++ device_port.c ++ log.c ++ srq.c ++ mc.c ++ buf.c ++) +diff --git b/providers/sxe2/Makefile b/providers/sxe2/Makefile +new file mode 100644 +index 0000000..a21610e +--- /dev/null ++++ b/providers/sxe2/Makefile +@@ -0,0 +1,80 @@ ++################################################################################ ++# Copyright (C) ++################################################################################ ++#(1) 固定模式. 定义路径信息 ++################################################################################ ++#注: MD_TOPDIR在Makefile.define将被使用, 因此需要预先定义 ++#考虑到内核模块编译, Makefile的调用路径与存储路径不一致, 因此不可以$(shell pwd)方式获取路径. ++TOPDIR_MP :=. ++MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST))) ++CURDIR := $(shell dirname $(MAKEPATH)) ++TOPDIR := $(abspath $(CURDIR)/$(TOPDIR_MP)) ++MD_TOPDIR := $(TOPDIR) ++MT_TOPDIR := $(TOPDIR) ++ ++################################################################################# ++#(2) 自定义模式 ++################################################################################# ++ ++###################################### ++#(2.1) 定义模块基本信息 ++####################################### ++ ++SRCS := $(wildcard *.c) ++OBJS := $(patsubst %.c,%.o,$(SRCS)) ++OBJ_S := libsxe2-rdmav34.a ++#CMR_INCS := -I$(INCS_ARCH) ++#CMR_INCS += -I$(INCS_ARCH)/cmr/ ++CMR_INCS += -I/usr/include/libnl3 ++CMR_INCS += -I/usr/include/drm ++CMR_INCS += -I$(TOPDIR)/../rdma-core-46.0/build/include/ ++LIBS_DIR := $(TOPDIR)/../rdma-core-46.0/build/lib/libibverbs.so ++CCAN_DIR := $(TOPDIR)/../rdma-core-46.0/build/ccan/libccan_pic.a ++UTIL_DIR := $(TOPDIR)/../rdma-core-46.0/build/util/librdma_util_pic.a ++CMR_LIBS := -lpthread ++#LIBS_DIR += $(TOPDIR_MP)/lib/lib_shca_libbase_x86_64.a ++ ++CFLAGS := -g -ggdb #支持调试信息 ++CFLAGS += -Wall ++#CFLAGS += -Werror #打开gcc所有告警选项,并将告警当作错误信息 ++CFLAGS += -Wextra #打开gcc额外告警选项 ++CFLAGS += -frecord-gcc-switches #后续可通过命令“readelf -p .GCC.command.line”查看编译选项参数 ++CFLAGS += -fprofile-arcs -ftest-coverage #启用gcover统计代码覆盖率 ++ ++VERBS_CFLAGS := $(CFLAGS) #verbs使用的cflags ++VERBS_CFLAGS += -std=gnu11 #使用gnu11编译 ++VERBS_CFLAGS += -Wno-sign-compare #临时关闭 ++VERBS_CFLAGS += -Wno-unused-parameter #临时关闭 ++VERBS_CFLAGS += -Wno-missing-field-initializers #临时关闭 ++####################################### ++#(2.2) 定义执行目标 ++####################################### ++ ++all:$(OBJS) ++ ar -cr -o $(OBJ_S) $^ ++ ranlib $(OBJ_S) ++ ++$(OBJS):%.o:%.c ++ gcc $(VERBS_CFLAGS) $(CMR_INCS) -c -o $@ $< $(CMR_LIBS) ++ ++clean: ++ @rm -rf *.o ut *.gcno *.gcda *.a ++ @rm -rf $(TOPDIR)/rdma-core-46.0/build/* ++ @rm -rf $(TOPDIR)/bin/verbs/* ++# @-$(MAKE) clean -C $(TOPDIR)/lib ++ @rm -rf logfile.txt result.txt ++ @echo all files made removed ++ ++#makefile帮助文档 ++help: ++ @echo Usage: ++ @echo "The following are some of the valid targets for this Makefile:" ++ @echo " all: Compile the whole project" ++ @echo " clean: Clean Compile file" ++ @echo "" ++.PHONY:all clean help liba ++%: ++ @-$(warning MAKE target needed, please get help from command 'make help') ++ @$(MAKE) help ++ ++.DEFAULT_GOAL=all +diff --git b/providers/sxe2/ah.c b/providers/sxe2/ah.c +new file mode 100644 +index 0000000..24b8667 +--- /dev/null ++++ b/providers/sxe2/ah.c @@ -0,0 +1,62 @@ + +#include @@ -237,9 +391,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/ah.c rdma-core-48.0/providers/sxe2/ + + return 0; +} -diff -Naur rdma-core-48.0.bak/providers/sxe2/buf.c rdma-core-48.0/providers/sxe2/buf.c ---- rdma-core-48.0.bak/providers/sxe2/buf.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/buf.c 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/buf.c b/providers/sxe2/buf.c +new file mode 100644 +index 0000000..670e1fa +--- /dev/null ++++ b/providers/sxe2/buf.c @@ -0,0 +1,313 @@ + +#include @@ -554,9 +710,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/buf.c rdma-core-48.0/providers/sxe2 + return; +} + -diff -Naur rdma-core-48.0.bak/providers/sxe2/buf.h rdma-core-48.0/providers/sxe2/buf.h ---- rdma-core-48.0.bak/providers/sxe2/buf.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/buf.h 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/buf.h b/providers/sxe2/buf.h +new file mode 100644 +index 0000000..0f34925 +--- /dev/null ++++ b/providers/sxe2/buf.h @@ -0,0 +1,42 @@ + +#ifndef __BUF_H__ @@ -600,64 +758,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/buf.h rdma-core-48.0/providers/sxe2 + +#endif + -diff -Naur rdma-core-48.0.bak/providers/sxe2/CMakeLists.txt rdma-core-48.0/providers/sxe2/CMakeLists.txt ---- rdma-core-48.0.bak/providers/sxe2/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/CMakeLists.txt 2026-05-27 17:08:05.580104739 +0800 -@@ -0,0 +1,51 @@ -+# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) -+if(DEFINED ENV{MD_MAKEMODE}) -+ set(makemode $ENV{MD_MAKEMODE}) -+else() -+ set(makemode release) -+endif() -+if(makemode STREQUAL "release") -+ add_definitions(-DSXE2_CFG_RELEASE) -+else() -+ add_definitions(-DSXE2_CFG_DEBUG) -+endif() -+if(DEFINED ENV{ASAN}) -+ set(asan $ENV{ASAN}) -+else() -+ set(asan no) -+endif() -+if(asan STREQUAL "yes") -+ add_definitions(-DSXE2_SUPPORT_ASAN) -+endif() -+if(DEFINED ENV{INJECT}) -+ set(inject $ENV{INJECT}) -+else() -+ set(inject no) -+endif() -+if(inject STREQUAL "yes") -+ add_definitions(-DSXE2_SUPPORT_INJECT) -+endif() -+if(DEFINED ENV{IO_STAT}) -+ set(iostat $ENV{IO_STAT}) -+else() -+ set(iostat no) -+endif() -+if(iostat STREQUAL "yes") -+ add_definitions(-DSXE2_SUPPORT_IO_STAT) -+endif() -+add_compile_options(-Werror) -+rdma_provider(sxe2 -+ sxe2_common.c -+ mr.c -+ io.c -+ ah.c -+ cq.c -+ pd.c -+ qp.c -+ db.c -+ device_port.c -+ log.c -+ srq.c -+ mc.c -+ buf.c -+) -diff -Naur rdma-core-48.0.bak/providers/sxe2/cq.c rdma-core-48.0/providers/sxe2/cq.c ---- rdma-core-48.0.bak/providers/sxe2/cq.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/cq.c 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/cq.c b/providers/sxe2/cq.c +new file mode 100644 +index 0000000..ac8cdf4 +--- /dev/null ++++ b/providers/sxe2/cq.c @@ -0,0 +1,405 @@ + +#include @@ -1064,9 +1169,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/cq.c rdma-core-48.0/providers/sxe2/ + return ret; +} + -diff -Naur rdma-core-48.0.bak/providers/sxe2/db.c rdma-core-48.0/providers/sxe2/db.c ---- rdma-core-48.0.bak/providers/sxe2/db.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/db.c 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/db.c b/providers/sxe2/db.c +new file mode 100644 +index 0000000..f64e49f +--- /dev/null ++++ b/providers/sxe2/db.c @@ -0,0 +1,622 @@ + +#include @@ -1690,9 +1797,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/db.c rdma-core-48.0/providers/sxe2/ +end: + return; +} -diff -Naur rdma-core-48.0.bak/providers/sxe2/device_port.c rdma-core-48.0/providers/sxe2/device_port.c ---- rdma-core-48.0.bak/providers/sxe2/device_port.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/device_port.c 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/device_port.c b/providers/sxe2/device_port.c +new file mode 100644 +index 0000000..e7fddad +--- /dev/null ++++ b/providers/sxe2/device_port.c @@ -0,0 +1,277 @@ + +#include @@ -1971,9 +2080,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/device_port.c rdma-core-48.0/provid +}; + +PROVIDER_DRIVER(sxe2, sxe2_udev_ops); -diff -Naur rdma-core-48.0.bak/providers/sxe2/device_port.h rdma-core-48.0/providers/sxe2/device_port.h ---- rdma-core-48.0.bak/providers/sxe2/device_port.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/device_port.h 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/device_port.h b/providers/sxe2/device_port.h +new file mode 100644 +index 0000000..fc9e831 +--- /dev/null ++++ b/providers/sxe2/device_port.h @@ -0,0 +1,48 @@ +#ifndef DEVICE_H +#define DEVICE_H @@ -2023,9 +2134,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/device_port.h rdma-core-48.0/provid +struct verbs_device *sxe2_ualloc_device(struct verbs_sysfs_dev *sysfs_dev); + +#endif -diff -Naur rdma-core-48.0.bak/providers/sxe2/io.c rdma-core-48.0/providers/sxe2/io.c ---- rdma-core-48.0.bak/providers/sxe2/io.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/io.c 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/io.c b/providers/sxe2/io.c +new file mode 100644 +index 0000000..8462f36 +--- /dev/null ++++ b/providers/sxe2/io.c @@ -0,0 +1,3829 @@ + +#include @@ -5856,9 +5969,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/io.c rdma-core-48.0/providers/sxe2/ + SXE2_RING_MOVE_TAIL(qp->sq_ring); +} + -diff -Naur rdma-core-48.0.bak/providers/sxe2/io.h rdma-core-48.0/providers/sxe2/io.h ---- rdma-core-48.0.bak/providers/sxe2/io.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/io.h 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/io.h b/providers/sxe2/io.h +new file mode 100644 +index 0000000..8bc07cb +--- /dev/null ++++ b/providers/sxe2/io.h @@ -0,0 +1,477 @@ + + @@ -6337,9 +6452,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/io.h rdma-core-48.0/providers/sxe2/ +void sxe2_push_nop_wqe(struct sxe2_qp_common *qp); + +#endif -diff -Naur rdma-core-48.0.bak/providers/sxe2/log.c rdma-core-48.0/providers/sxe2/log.c ---- rdma-core-48.0.bak/providers/sxe2/log.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/log.c 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/log.c b/providers/sxe2/log.c +new file mode 100644 +index 0000000..2435216 +--- /dev/null ++++ b/providers/sxe2/log.c @@ -0,0 +1,468 @@ + +#include @@ -6809,9 +6926,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/log.c rdma-core-48.0/providers/sxe2 + free(local_log_buf); + return; +} -diff -Naur rdma-core-48.0.bak/providers/sxe2/log.h rdma-core-48.0/providers/sxe2/log.h ---- rdma-core-48.0.bak/providers/sxe2/log.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/log.h 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/log.h b/providers/sxe2/log.h +new file mode 100644 +index 0000000..042bd39 +--- /dev/null ++++ b/providers/sxe2/log.h @@ -0,0 +1,245 @@ + +#ifndef _SXE2_LOG_H_ @@ -7058,93 +7177,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/log.h rdma-core-48.0/providers/sxe2 +#endif + +#endif -diff -Naur rdma-core-48.0.bak/providers/sxe2/Makefile rdma-core-48.0/providers/sxe2/Makefile ---- rdma-core-48.0.bak/providers/sxe2/Makefile 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/Makefile 2026-05-27 17:08:05.579104733 +0800 -@@ -0,0 +1,80 @@ -+################################################################################ -+# Copyright (C) -+################################################################################ -+#(1) 固定模式. 定义路径信息 -+################################################################################ -+#注: MD_TOPDIR在Makefile.define将被使用, 因此需要预先定义 -+#考虑到内核模块编译, Makefile的调用路径与存储路径不一致, 因此不可以$(shell pwd)方式获取路径. -+TOPDIR_MP :=. -+MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST))) -+CURDIR := $(shell dirname $(MAKEPATH)) -+TOPDIR := $(abspath $(CURDIR)/$(TOPDIR_MP)) -+MD_TOPDIR := $(TOPDIR) -+MT_TOPDIR := $(TOPDIR) -+ -+################################################################################# -+#(2) 自定义模式 -+################################################################################# -+ -+###################################### -+#(2.1) 定义模块基本信息 -+####################################### -+ -+SRCS := $(wildcard *.c) -+OBJS := $(patsubst %.c,%.o,$(SRCS)) -+OBJ_S := libsxe2-rdmav34.a -+#CMR_INCS := -I$(INCS_ARCH) -+#CMR_INCS += -I$(INCS_ARCH)/cmr/ -+CMR_INCS += -I/usr/include/libnl3 -+CMR_INCS += -I/usr/include/drm -+CMR_INCS += -I$(TOPDIR)/../rdma-core-46.0/build/include/ -+LIBS_DIR := $(TOPDIR)/../rdma-core-46.0/build/lib/libibverbs.so -+CCAN_DIR := $(TOPDIR)/../rdma-core-46.0/build/ccan/libccan_pic.a -+UTIL_DIR := $(TOPDIR)/../rdma-core-46.0/build/util/librdma_util_pic.a -+CMR_LIBS := -lpthread -+#LIBS_DIR += $(TOPDIR_MP)/lib/lib_shca_libbase_x86_64.a -+ -+CFLAGS := -g -ggdb #支持调试信息 -+CFLAGS += -Wall -+#CFLAGS += -Werror #打开gcc所有告警选项,并将告警当作错误信息 -+CFLAGS += -Wextra #打开gcc额外告警选项 -+CFLAGS += -frecord-gcc-switches #后续可通过命令“readelf -p .GCC.command.line”查看编译选项参数 -+CFLAGS += -fprofile-arcs -ftest-coverage #启用gcover统计代码覆盖率 -+ -+VERBS_CFLAGS := $(CFLAGS) #verbs使用的cflags -+VERBS_CFLAGS += -std=gnu11 #使用gnu11编译 -+VERBS_CFLAGS += -Wno-sign-compare #临时关闭 -+VERBS_CFLAGS += -Wno-unused-parameter #临时关闭 -+VERBS_CFLAGS += -Wno-missing-field-initializers #临时关闭 -+####################################### -+#(2.2) 定义执行目标 -+####################################### -+ -+all:$(OBJS) -+ ar -cr -o $(OBJ_S) $^ -+ ranlib $(OBJ_S) -+ -+$(OBJS):%.o:%.c -+ gcc $(VERBS_CFLAGS) $(CMR_INCS) -c -o $@ $< $(CMR_LIBS) -+ -+clean: -+ @rm -rf *.o ut *.gcno *.gcda *.a -+ @rm -rf $(TOPDIR)/rdma-core-46.0/build/* -+ @rm -rf $(TOPDIR)/bin/verbs/* -+# @-$(MAKE) clean -C $(TOPDIR)/lib -+ @rm -rf logfile.txt result.txt -+ @echo all files made removed -+ -+#makefile帮助文档 -+help: -+ @echo Usage: -+ @echo "The following are some of the valid targets for this Makefile:" -+ @echo " all: Compile the whole project" -+ @echo " clean: Clean Compile file" -+ @echo "" -+.PHONY:all clean help liba -+%: -+ @-$(warning MAKE target needed, please get help from command 'make help') -+ @$(MAKE) help -+ -+.DEFAULT_GOAL=all -diff -Naur rdma-core-48.0.bak/providers/sxe2/mc.c rdma-core-48.0/providers/sxe2/mc.c ---- rdma-core-48.0.bak/providers/sxe2/mc.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/mc.c 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/mc.c b/providers/sxe2/mc.c +new file mode 100644 +index 0000000..98e5f2f +--- /dev/null ++++ b/providers/sxe2/mc.c @@ -0,0 +1,13 @@ + +#include "verbs.h" @@ -7159,9 +7196,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/mc.c rdma-core-48.0/providers/sxe2/ +{ + return ibv_cmd_detach_mcast(qp, gid, lid); +} -diff -Naur rdma-core-48.0.bak/providers/sxe2/mr.c rdma-core-48.0/providers/sxe2/mr.c ---- rdma-core-48.0.bak/providers/sxe2/mr.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/mr.c 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/mr.c b/providers/sxe2/mr.c +new file mode 100644 +index 0000000..04c7c37 +--- /dev/null ++++ b/providers/sxe2/mr.c @@ -0,0 +1,98 @@ + +#include @@ -7261,9 +7300,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/mr.c rdma-core-48.0/providers/sxe2/ + + return &mr->vmr.ibv_mr; +} -diff -Naur rdma-core-48.0.bak/providers/sxe2/pd.c rdma-core-48.0/providers/sxe2/pd.c ---- rdma-core-48.0.bak/providers/sxe2/pd.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/pd.c 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/pd.c b/providers/sxe2/pd.c +new file mode 100644 +index 0000000..c59b375 +--- /dev/null ++++ b/providers/sxe2/pd.c @@ -0,0 +1,87 @@ + +#include @@ -7352,9 +7393,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/pd.c rdma-core-48.0/providers/sxe2/ + return ret; +} + -diff -Naur rdma-core-48.0.bak/providers/sxe2/qp.c rdma-core-48.0/providers/sxe2/qp.c ---- rdma-core-48.0.bak/providers/sxe2/qp.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/qp.c 2026-05-27 17:08:05.581104746 +0800 +diff --git b/providers/sxe2/qp.c b/providers/sxe2/qp.c +new file mode 100644 +index 0000000..1d49a50 +--- /dev/null ++++ b/providers/sxe2/qp.c @@ -0,0 +1,782 @@ +#include +#include @@ -8138,9 +8181,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/qp.c rdma-core-48.0/providers/sxe2/ + + return ibv_cmd_query_qp(ibqp, attr, attr_mask, init_attr, &cmd, sizeof(cmd)); +} -diff -Naur rdma-core-48.0.bak/providers/sxe2/readme.txt rdma-core-48.0/providers/sxe2/readme.txt ---- rdma-core-48.0.bak/providers/sxe2/readme.txt 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/readme.txt 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/readme.txt b/providers/sxe2/readme.txt +new file mode 100644 +index 0000000..bb193d6 +--- /dev/null ++++ b/providers/sxe2/readme.txt @@ -0,0 +1,15 @@ +ah.c:ah用户态接口实现 +ah.h:ah用户态接口声明 @@ -8157,9 +8202,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/readme.txt rdma-core-48.0/providers +mw.c:mw用户态接口实现 +pd.c:pd用户态接口实现 +mc.c:组播用户态接口实现 -diff -Naur rdma-core-48.0.bak/providers/sxe2/ring.h rdma-core-48.0/providers/sxe2/ring.h ---- rdma-core-48.0.bak/providers/sxe2/ring.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/ring.h 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/ring.h b/providers/sxe2/ring.h +new file mode 100644 +index 0000000..e3b961a +--- /dev/null ++++ b/providers/sxe2/ring.h @@ -0,0 +1,127 @@ +#ifndef __RING_H_ +#define __RING_H_ @@ -8288,9 +8335,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/ring.h rdma-core-48.0/providers/sxe + (_cq)->cq_base[SXE2_RING_CURRENT_HEAD((_cq)->cq_ring)].buf \ + ) +#endif -diff -Naur rdma-core-48.0.bak/providers/sxe2/srq.c rdma-core-48.0/providers/sxe2/srq.c ---- rdma-core-48.0.bak/providers/sxe2/srq.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/srq.c 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/srq.c b/providers/sxe2/srq.c +new file mode 100644 +index 0000000..506aeb5 +--- /dev/null ++++ b/providers/sxe2/srq.c @@ -0,0 +1,451 @@ + +#include @@ -8743,9 +8792,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/srq.c rdma-core-48.0/providers/sxe2 +end: + return ret; +} -diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2-abi.h rdma-core-48.0/providers/sxe2/sxe2-abi.h ---- rdma-core-48.0.bak/providers/sxe2/sxe2-abi.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/sxe2-abi.h 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/sxe2-abi.h b/providers/sxe2/sxe2-abi.h +new file mode 100644 +index 0000000..a20aa98 +--- /dev/null ++++ b/providers/sxe2/sxe2-abi.h @@ -0,0 +1,108 @@ +#ifndef __SXE2_ABI_STRUCT_H__ +#define __SXE2_ABI_STRUCT_H__ @@ -8855,9 +8906,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2-abi.h rdma-core-48.0/providers +}; + +#endif -diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2_abi.h rdma-core-48.0/providers/sxe2/sxe2_abi.h ---- rdma-core-48.0.bak/providers/sxe2/sxe2_abi.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/sxe2_abi.h 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/sxe2_abi.h b/providers/sxe2/sxe2_abi.h +new file mode 100644 +index 0000000..8150c2b +--- /dev/null ++++ b/providers/sxe2/sxe2_abi.h @@ -0,0 +1,29 @@ +#ifndef __SXE2_ABI_H__ +#define __SXE2_ABI_H__ @@ -8888,9 +8941,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2_abi.h rdma-core-48.0/providers + sxe2_create_srq_req, sxe2_create_srq_resp); + +#endif -diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2_common.c rdma-core-48.0/providers/sxe2/sxe2_common.c ---- rdma-core-48.0.bak/providers/sxe2/sxe2_common.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/sxe2_common.c 2026-05-27 17:08:05.580104739 +0800 +diff --git b/providers/sxe2/sxe2_common.c b/providers/sxe2/sxe2_common.c +new file mode 100644 +index 0000000..7eb0f00 +--- /dev/null ++++ b/providers/sxe2/sxe2_common.c @@ -0,0 +1,37 @@ +#include "sxe2_common.h" + @@ -8929,9 +8984,11 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2_common.c rdma-core-48.0/provid + return ++value; +} + -diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2_common.h rdma-core-48.0/providers/sxe2/sxe2_common.h ---- rdma-core-48.0.bak/providers/sxe2/sxe2_common.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/sxe2_common.h 2026-05-27 17:08:05.581104746 +0800 +diff --git b/providers/sxe2/sxe2_common.h b/providers/sxe2/sxe2_common.h +new file mode 100644 +index 0000000..1d8c60f +--- /dev/null ++++ b/providers/sxe2/sxe2_common.h @@ -0,0 +1,717 @@ +#ifndef __SXE2_COMMON_H__ +#define __SXE2_COMMON_H__ @@ -9650,14 +9707,21 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/sxe2_common.h rdma-core-48.0/provid +} + +#endif -diff -Naur rdma-core-48.0.bak/providers/sxe2/verbs.c rdma-core-48.0/providers/sxe2/verbs.c ---- rdma-core-48.0.bak/providers/sxe2/verbs.c 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/verbs.c 2026-05-27 17:08:05.581104746 +0800 +diff --git b/providers/sxe2/sxe2_private_verbs.h b/providers/sxe2/sxe2_private_verbs.h +new file mode 100644 +index 0000000..e69de29 +diff --git b/providers/sxe2/verbs.c b/providers/sxe2/verbs.c +new file mode 100644 +index 0000000..8b13789 +--- /dev/null ++++ b/providers/sxe2/verbs.c @@ -0,0 +1 @@ + -diff -Naur rdma-core-48.0.bak/providers/sxe2/verbs.h rdma-core-48.0/providers/sxe2/verbs.h ---- rdma-core-48.0.bak/providers/sxe2/verbs.h 1970-01-01 08:00:00.000000000 +0800 -+++ rdma-core-48.0/providers/sxe2/verbs.h 2026-05-27 17:08:05.579104733 +0800 +diff --git b/providers/sxe2/verbs.h b/providers/sxe2/verbs.h +new file mode 100644 +index 0000000..c9331d3 +--- /dev/null ++++ b/providers/sxe2/verbs.h @@ -0,0 +1,6 @@ +#ifndef __SXE2_USER_VERBS_H__ +#define __SXE2_USER_VERBS_H__ @@ -9665,4 +9729,4 @@ diff -Naur rdma-core-48.0.bak/providers/sxe2/verbs.h rdma-core-48.0/providers/sx +#include "sxe2_common.h" + +#endif -\ 文件尾没有换行符 +\ No newline at end of file diff --git a/SPECS/rdma-core.spec b/SPECS/rdma-core.spec index 99f076dfb50e23d48de7dd0ed21160544c116abc..da1435587bf9c4e3dfd255004d5760e324f59607 100644 --- a/SPECS/rdma-core.spec +++ b/SPECS/rdma-core.spec @@ -1,6 +1,6 @@ Name: rdma-core Version: 48.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RDMA core userspace libraries and daemons # Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license @@ -634,6 +634,8 @@ fi %endif %changelog +* Mon June 1 2026 Jie Liu - 48.0-3 +- Switched to generating the patch using `git diff`. * Tue May 26 2026 Jie Liu - 48.0-2 - support SXE2 rdma-core