UCT/IB/MLX5: Avoid caching AH for UD/DC connect - #11833
Open
tvegas1 wants to merge 1 commit into
Open
Conversation
UD mlx5 and DC connect extract the resolved AV bytes from a device-cached AH, which can retain a stale MAC once the peer's IP-to-MAC mapping changes. Create this AH uncached and destroy it right after copying out the AV, matching the fix already applied to the RC DevX QP-connect path. DC's pure-grant reply still relies on the cached AH; left unchanged for now, with a TODO to move it to the same uncached helper.
|
🤖 Starting review — findings will be posted here when done. |
|
Optional (non-blocking): was this validated on RoCE hardware? The stale-L2-address case that motivates the fix is RoCE-specific, and there's no regression test — worth confirming the AV extraction path still behaves on a real RoCE device. |
brminich
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
UD mlx5 and DC connect no longer use cached address handle (AH). The shared
uct_ud_mlx5_iface_get_av()helper now creates a temporary, uncached AH just to extract the AV bytes, then destroys it right away.Why?
The cached AH is keyed by resolved LID/GID and has no reliable invalidation path, so a peer's stale L2 address could keep being reused. The AH is only needed transiently here to read its AV bytes.
How?
uct_ud_mlx5_iface_get_av()does not go through the cached AH store anymore. This single shared helper covers both callers: UD mlx5 connect and DC connect.Connection matching and
is_connected()already compared the resolved LID/GID/QPN params, not the AH itself, so nothing else needed to change there. DC's pure-grant reply still uses the cached path, left as a follow-up TODO since it could have performance implications.