Skip to content

Resolve current master conflicts and preserve UBSHM IPC V2 negotiation - #75

Merged
zchuango merged 11 commits into
LinQuickDev:transport-handshakefrom
Spicy-cream:review/pr3535-sync-master-oct15
Oct 16, 2026
Merged

zchuango merged 11 commits into
LinQuickDev:transport-handshakefrom
Spicy-cream:review/pr3535-sync-master-oct15

Conversation

@Spicy-cream

Copy link
Copy Markdown

Summary

Resolve the conflicts between the transport-handshake branch and Apache master at 154783f.

  • Preserve upstream UBRing IPC_V2 support and its tests.
  • Select IPC_V2 for the IPC backend and LEGACY_64 for the UBS backend; only upgrade when both sides select the same supported format.
  • Pass the peer shared-memory length and selected format through client mapping and server allocation, and publish the format before activating the upgraded transport.
  • Add IPC_V2 extension validation tests and verify the upgraded shared-memory RPC path selects IPC_V2.
  • Update the short design document to reflect both formats. No unrelated formatting cleanup or new edits to upstream RDMA tests.

Validation

Linux WSL build with RDMA and UBRing enabled:

  • brpc_transport_handshake_unittest: 28 passed.
  • brpc_ubring_unittest: 42 passed.
  • brpc_rdma_unittest: 92 passed.
  • IPC_V2 adapter and upgraded RPC tests: 9 tests repeated three times, all passed.
  • git diff --check: passed.

Integration

The final source tree was first reconstructed by rebasing onto current Apache master and tested. This delivery commit has the existing transport-handshake tip and current Apache master as its two parents, so it can be merged into transport-handshake without rewriting that protected/shared branch.

Please use a merge commit, not squash or rebase-merge, when integrating this PR: the upstream master ancestry must be retained. After integration, re-check apache/brpc pull request 3535 mergeability and CI against the then-current master. This PR does not directly modify the community PR source branch.

chenBright and others added 10 commits October 9, 2026 17:41
Fail during dependency discovery when WITH_BORINGSSL is enabled and required components are missing.

Check the include directory, SSL library, and Crypto library separately to avoid reporting success for an incomplete library list.
…apache#3571)

PR3332 introduced a Zvbc vector CRC32C path, but its implementation
kept per-lane scalar round-trips (vector->scalar xor->vector) in the
hot loop and fixed VLEN=128 (vsetvl_e64m1(2)), so VLEN>=256 cores
only used half the width. On Spacemit X100 the Zvbc path measured
~450-600 MB/s, slower than the scalar Zbc path (~1.5 GB/s), making
the "Zvbc preferred" dispatch a ~2.5x regression there.

Rewrite rv_crc32c_vclmul:

  - adaptive VLEN: one e64m1 pair at VLEN>=256 (4 lanes) or two
    pairs at VLEN=128 (4 lanes carried on 2 vectors), so 128-bit
    cores run the vector path at full width;
  - pure-vector main loop: vlseg2e64 de-interleaved loads and
    vclmul_vx broadcast constants (k1..k4), zero scalar extraction;
  - all-vector reduction: single-element vector vclmul for the
    4-to-1 lane merge and Barrett reduction, removing scalar-clmul
    dependencies (safe on cores with Zvbc but no scalar Zbc, e.g.
    SG2044);
  - same fold constants and math as the scalar core -> bit-exact.

Correctness on k3: RFC3720 vectors (4 standard PASS), Extend
composition, 70 boundary/misalign/large combos, and the official
CRC.* gtest suite (5/5 PASSED) all bit-consistent across
table/clmul/vclmul.

Performance on k3 (X100, VLEN=256, 100-round median, same harness as
PR3312):

    len      PR3332 vclmul (MB/s)   this (MB/s)   speedup
    1 KiB           578                 5895         10.2x
    4 KiB           590                 9400         15.9x
    64 KiB          600                11502         19.2x
    1 MiB           508                11708         23.1x

Signed-off-by: Xiaofei Gong <gongxiaofei24@iscas.ac.cn>
Signed-off-by: YuanSheng <yuansheng@isrc.iscas.ac.cn>
The AMF0 number is a peer-controlled double; casting NaN or values outside [0, UINT32_MAX] to uint32_t is undefined behavior (UBSan float-cast-overflow) and decodes to different ids per platform. Validate the range before the cast.
/hotspots/* wrote view and base into its inline script without the ValidProfilePath check that its *_non_responsive handler already applies, and /rpcz printed the pointer of the time parameter instead of the escaped value.
* Add IPC_V2 data path for UBRing IPC

* Move IPC_V2 ring implementation out of header

---------

Co-authored-by: BGQ99 <1132767344@qq.com>
…lity

Resolve UBSHM handshake conflicts using the tested rebased tree. Retain backend-specific format negotiation, remote shared-memory lengths, and upstream IPC V2 tests.
@zchuango
zchuango merged commit 7ebd2f2 into LinQuickDev:transport-handshake Oct 16, 2026
26 checks 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.

8 participants