Skip to content

pyverbs: Update MW rkey after type 2 bind - #1777

Open
zzwzds wants to merge 1 commit into
linux-rdma:masterfrom
zzwzds:pyverbs-update-type2-mw-rkey
Open

pyverbs: Update MW rkey after type 2 bind#1777
zzwzds wants to merge 1 commit into
linux-rdma:masterfrom
zzwzds:pyverbs-update-type2-mw-rkey

Conversation

@zzwzds

@zzwzds zzwzds commented Jul 21, 2026

Copy link
Copy Markdown

Synchronize MW.rkey with the rkey assigned by a successfully posted
type 2 bind WR.

The type 2 MW test now verifies the synchronized MW rkey and uses it
for subsequent remote access.

@zzwzds
zzwzds force-pushed the pyverbs-update-type2-mw-rkey branch from 7be8741 to 46186e2 Compare July 21, 2026 06:23
@rleon

rleon commented Aug 4, 2026

Copy link
Copy Markdown
Member

Please add description of what is the problem that you are fixing into the commit message.

Thanks

set_bind_wr() assigns the incremented rkey to the bind WR but leaves MW.rkey unchanged. After the bind succeeds, applications that publish MW.rkey to the peer send the old rkey, while the NIC has already bound the MW with the new rkey. Remote access using the stale rkey consequently fails with a remote access error.

Synchronize MW.rkey with the rkey of successfully posted IBV_WR_BIND_MW requests. When posting a WR list partially fails, only Bind WRs before bad_wr are updated, since those are the requests accepted by ibv_post_send().

Signed-off-by: Zhiwei Zhang <zhangzhiwei@bitintelligence.io>
@zzwzds
zzwzds force-pushed the pyverbs-update-type2-mw-rkey branch from 46186e2 to 35fd17c Compare August 4, 2026 11:22
@zzwzds

zzwzds commented Aug 4, 2026

Copy link
Copy Markdown
Author

Please add description of what is the problem that you are fixing into the commit message.

Thanks

Synchronize MW.rkey with the rkey assigned by a successfully posted
type 2 bind WR.

The type 2 MW test now verifies the synchronized MW rkey and uses it
for subsequent remote access.

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.

3 participants