rdma: port the hipObject v2 RC session core

Port the hipObject v2 reliable-connection session core into
cuwrapper/rc: the session table and state machine, the wire
codec for the hipobj-rc-v2 headers, request parsing, the
injectable clock and randomness sources, the transport layer
(QP/CQ lifecycle, RTR/RTS transitions, staging registration),
the data phase (RDMA write with immediate for GET, receive with
immediate for PUT), the RDMA token codec, and the dynamically
loaded ibverbs shim (ibv-core.h plus the dlopen host binding).

The sources are a port of the upstream hipObject v2 core, kept
close to the original so the two trees can be diffed during
review. Nothing links against them yet; a Makefile rule builds
the objects into rdma/librcserver.a for the ABI layer that
follows.

Signed-off-by: Jihyeon Gim <potatogim@potatogim.net>
This commit is contained in:
Jihyeon Gim
2026-08-30 00:00:29 +09:00
parent 83b5e7041c
commit efa0309da4
24 changed files with 4070 additions and 0 deletions
+14
View File
@@ -54,6 +54,10 @@ CUOBJCLIENT_WRAPPER_LIB=rdma/libcuobjclientwrapper.a
CUOBJCLIENT_CGO_CFLAGS=-I$(CUOBJ_CLIENT_INC_DIR) -I$(CUOBJ_CUDA_INC_DIR)
CUOBJCLIENT_CGO_LDFLAGS=-L$(CUOBJ_LIB_DIR) -Wl,-rpath,$(CUOBJ_LIB_DIR)
HOSTCLIENT_WRAPPER_LIB=rdma/libhostclientwrapper.a
RCSERVER_LIB=rdma/librcserver.a
RCSERVER_SRCS=$(wildcard cuwrapper/rc/*.cpp)
RCSERVER_OBJS=$(RCSERVER_SRCS:.cpp=.o)
RCSERVER_CXXFLAGS=-fPIC -std=c++17 -Icuwrapper/rc
VERSION := $(shell if test -e VERSION; then cat VERSION; else git describe --abbrev=0 --tags HEAD; fi)
BUILD := $(shell git rev-parse --short HEAD || echo release-rpm)
@@ -93,6 +97,15 @@ $(HOSTCLIENT_WRAPPER_LIB): cuwrapper/rdma_host_client_wrapper.cpp cuwrapper/rdma
$(AR) rcs $(HOSTCLIENT_WRAPPER_LIB) cuwrapper/rdma_host_client_wrapper.o
rm -f cuwrapper/rdma_host_client_wrapper.o
$(RCSERVER_LIB): $(RCSERVER_OBJS)
$(AR) rcs $@ $^
rm -f $(RCSERVER_OBJS)
cuwrapper/rc/%.o: cuwrapper/rc/%.cpp
$(CXX) $(RCSERVER_CXXFLAGS) -c -o $@ $<
.INTERMEDIATE: $(RCSERVER_OBJS)
.PHONY: vgwrdma
vgwrdma: $(VGWRDMA_WRAPPER_LIB)
CGO_ENABLED=1 \
@@ -171,6 +184,7 @@ cleanall: clean
rm -f $(VGWRDMA_WRAPPER_LIB)
rm -f $(CUOBJCLIENT_WRAPPER_LIB)
rm -f $(HOSTCLIENT_WRAPPER_LIB)
rm -f $(RCSERVER_LIB)
rm -f versitygw-*.tar
rm -f versitygw-*.tar.gz