Repository navigation
UCT/UD: Add generation ID to dest_id to make it unique - #11800
Conversation
| ucs_trace("iface %p: dropping packet with dest_id %u", iface, dest_id); | ||
| goto out; | ||
| } else if (ucs_unlikely(ep->ep_id != dest_id)) { | ||
| ucs_debug("iface %p: dropping packet of a closed connection, dest_id %u" |
There was a problem hiding this comment.
maybe also print generations?
There was a problem hiding this comment.
We can do that, but then we need to update all the places where we print dest_id I think
So we can have something like:
dest_id 0x40007b(gen_id:1, ep_index:123)
There was a problem hiding this comment.
Added several logging macros helpers, here is the log example it produces
ep=0x76464c919810(id=0x71(gen_id=0 ep_index=113), conn_sn=22) -> dest_ep_id=0x293(gen_id=0 ep_index=659)
d8b5c62 to
8a7f223
Compare
|
|
||
| ep_index = ucs_ptr_array_insert(&iface->eps, ep); | ||
| ep_gen = ucs_array_elem(&iface->ep_gen, ep_index); | ||
| ep->ep_id = (ep_gen << UCT_UD_EP_INDEX_BITS) | ep_index; |
There was a problem hiding this comment.
minor: since we have one liner helper uct_ud_ep_id_to_index maybe add the same for ep_id by gen + index here and similar for gen in uct_ud_iface_remove_ep
There was a problem hiding this comment.
I had it initially, but then removed. It is used in just one place, so I preferred to have an explicit assignment
|
🤖 CI Triage Agent — TL;DR: The GPU job failed on a single gtest case, Full analysisSummary: Root cause: From the log, the only failure is the Importantly, PR #11800 is titled "UCT/UD: Add generation ID to dest_id to make it unique" — a UD‑transport change. This test runs with Note: the assertion text itself (whether Implicated commit: unknown for the failure itself; the PR under test (0a7188b, iyastreb/unique_dest_id) is not implicated. Most likely area of pre‑existing instability: File: Suggested fix:
Related: #11800 (the PR under test — UD |
What?
Introduce generation ID to the UD dest_id, in order to avoid reusing stale dest_id of dropped connections
Why?
UD line uses
dest_idas a connection identifier, which is equal toep_id= slot in the EPs array.When certain UD EP gets destroyed, its
ep_idmight be reused by a subsequent connection.This is a problem, because remote side may still not know that connection is destroyed and recreated, and either keeps sending keep-alive packets, or stale ACKs come late due to switch problem.
How?
Steal 2 bits from dest_id for always increment generation id.
This reduces the max possible amount of UD EPs created from 16mln to 4mln
Related fix: #11092