SIGN IN SIGN UP

UCP/AM/FT: introduce resend flag for first fragment retransmissions (#11452)

Set UCP_AM_HDR_FLAG_RESEND on the first fragment of every restart from
ucp_am_eager_multi_zcopy_psn_reset so the receiver can recover from an
orphan partial first_rdesc left in started_ams by the previous
(multi-fragment) attempt.
The receiver only consults this bit when the restart delivers the whole
payload in a single first fragment (am_length == total_length); in that
case it must evict the leftover partial first_rdesc, because the
receiver iterates started_ams in order and stops at the first incomplete
rdesc to preserve in-order PSN delivery. Without the eviction, an
orphan would strand every later msg_id on this ep even after they fully
assemble. The user callback for this msg_id is still invoked from the
single-frag delivery path either way.
All other restart shapes (multi-frag -> multi-frag, single-frag -> *)
are already handled by ucp_am_find_first_rdesc or by PSN dedup, so the
bit is a no-op for them. Setting it unconditionally is cheap (one OR on
the slow restart path) and avoids having to predict the post-reset
segmentation here, before the proto is re-selected.
The zcopy reset path intentionally keeps UCP_REQUEST_FLAG_PROTO_INITIALIZED
set to avoid memory re-registration, so the proto's init callback is
skipped on restart and a hint set there would not fire; tagging in reset
is therefore the right place.
E
Evgeny Leksikov committed
2bafbb027d7005c531b143fbfe66bf9b361b8fdc
Parent: 230532d
Committed by GitHub <noreply@github.com> on 6/8/2026, 12:00:43 PM