mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4309] [Bug]: hard-coded attr.max_rd_atomic = 16 causes modify_qp failure #1079
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#1079
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shenhongqian on GitHub (Sep 24, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4309
Bug Report
attr.max_rd_atomic = 16.Is it feasible to use
ibv_query_deviceto retrieve device attributes and configuremax_rd_atomicrespecting the hardware’s supported limits?Before submitting...
@github-actions[bot] commented on GitHub (Sep 24, 2026):
Thanks for opening this issue, @shenhongqian!
37929351A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide
@he-yufeng commented on GitHub (Sep 26, 2026):
Verified the report against current main and sketched the minimal fix, since this has been sitting for two days.
The hardcode is real and singular:
rdma_endpoint.cpp:1221setsattr.max_rd_atomic = 16on the RTR->RTS transition and passesIBV_QP_MAX_QP_RD_ATOMIC, so a device whosemax_qp_rd_atomis below 16 failsibv_modify_qpat setup. The device attributes are already queried once at context construction (rdma_context.cpp:1250, then forwarded toupdateGlobalConfig), so the natural fix needs no new verbs call: carrydevice_attr.max_qp_rd_atomthrough the context and clamp tomin(16, device_attr.max_qp_rd_atom)at the endpoint site. Same-pattern precedent one screen down in the same function: the LAG-port block is explicitly a no-op when the device doesn't support it, which is the shape the clamp should take (never raise above device capability, never change behavior on capable NICs).Verification honesty: Mooncake CI builds the EFA wheel but runs no RDMA hardware (
ci_efa.ymlhas BUILD_UNIT_TESTS=OFF), and I have no NIC here either, so whoever picks this up should get one setup confirmation on the affected NIC variant from the reporter before merge; the change itself is compile-level and a few lines. I'm not opening the PR blind for exactly that reason, but the fix above is ready to take.