Skip to content

feat: add common transport-level handshake for RDMA and UBSHM - #46

Merged
zchuango merged 3 commits into
LinQuickDev:transport-handshakefrom
Spicy-cream:community/common-handshake-rdma
Sep 11, 2026
Merged

feat: add common transport-level handshake for RDMA and UBSHM#46
zchuango merged 3 commits into
LinQuickDev:transport-handshakefrom
Spicy-cream:community/common-handshake-rdma

Conversation

@Spicy-cream

@Spicy-cream Spicy-cream commented Sep 10, 2026

Copy link
Copy Markdown

Summary

This PR implements the transport-level handshake design discussed in apache/brpc#3432.

It introduces a common handshake framework above individual high-speed transports and migrates both RDMA and UBSHM handshake orchestration to that framework. TCP remains the control-plane transport during negotiation and is retained when a high-speed transport is unavailable or negotiation falls back.

This is a cleaned and consolidated version of #35.

Main changes

  • Add AdapterTransport as the top-level transport for TCP, RDMA, and UBSHM sockets.
  • Add common handshake session, framing, I/O, and adapter abstractions.
  • Move RDMA handshake orchestration out of RdmaEndpoint.
  • Move UBSHM handshake orchestration out of UBShmEndpoint.
  • Keep transport-specific resource allocation and data-plane operations in their respective transports and endpoints.
  • Preserve the existing RDMA protocol ID and registered name.
  • Preserve RDMA v2/v3 and UBSHM wire formats.
  • Preserve TCP fallback behavior when high-speed transport negotiation is unavailable or rejected.
  • Add unit tests for framing, state transitions, partial input, fallback, compatibility, and transport-specific behavior.

Validation

  • Default configuration and build: passed.
  • Common transport handshake unit tests: 16/16 passed.
  • WITH_RDMA=ON, WITH_UBRING=ON, BUILD_UNIT_TESTS=ON: configured and built successfully.
  • RDMA unit tests: 86/86 passed.
  • UBSHM/UBRING unit tests: passed.
  • License, Linux, macOS, Bazel, CMake, Make, Clang, GCC, and ASan checks are covered by repository CI.

Scope

This PR contains the common transport-handshake infrastructure together with the RDMA and UBSHM migrations.

URMA migration is intentionally left for a follow-up change.

@Spicy-cream
Spicy-cream force-pushed the community/common-handshake-rdma branch 3 times, most recently from 9e11eb3 to 1a2bc22 Compare September 11, 2026 10:02
@Spicy-cream
Spicy-cream changed the base branch from master to transport-handshake September 11, 2026 10:11
@Spicy-cream Spicy-cream changed the title feat: add common transport-level handshake for RDMA feat: add common transport-level handshake for RDMA and UBSHM Sep 11, 2026
@zchuango
zchuango merged commit f0a6eed into LinQuickDev:transport-handshake Sep 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants