Observe ACK queue peaks before immediate send

This commit is contained in:
evgeny committed 2026-10-24 14:43:03 +02:00
1 parent 7e166c650c
commit 35bd19b6c0
1 file changed
+6 -1
+6 -1
View File
@@ -305,6 +305,7 @@ static void observe_packet(struct ETCP_DGRAM* pkt, struct ETCP_LINK* link, int s
int side = link->etcp->instance == ep[0].inst ? 0 : 1, path = -1;
for (unsigned p = 0; p < path_count; p++)
if (ss_get_port(&link->remote_addr) == dummynet_get_listen_port(channels[p])) path = p;
if (path >= 0 && !sending) diagnostic_for(link);
if (path >= 0) for (unsigned offset = 0; offset < pkt->data_len;) {
const uint8_t* data = pkt->data + offset;
unsigned remaining = pkt->data_len - offset, len;
@@ -418,7 +419,11 @@ int __wrap_queue_data_put_with_index(struct ll_queue* q, struct ll_entry* entry)
}
}
}
return __real_queue_data_put_with_index(q, entry);
int result = __real_queue_data_put_with_index(q, entry);
if (!result && diagnostic_active) for (unsigned side = 0; side < 2; side++)
for (struct ETCP_LINK* l = ep[side].conn->links; l; l = l->next)
if (q == l->ack_q) diagnostic_for(l); // ACK-пик виден до немедленной отправки/извлечения из очереди.
return result;
}
struct ETCP_LINK* __real_etcp_loadbalancer_select_link(struct ETCP_CONN*, uint32_t, const struct INFLIGHT_PACKET*);