From 35bd19b6c092a85c1929a46e3a14cff737de1380 Mon Sep 17 00:00:00 2001 From: evgeny Date: Sat, 24 Oct 2026 13:39:06 +0200 Subject: [PATCH] Observe ACK queue peaks before immediate send --- tests/test_etcp_multipath.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_etcp_multipath.c b/tests/test_etcp_multipath.c index 151e54be..5e9f8530 100644 --- a/tests/test_etcp_multipath.c +++ b/tests/test_etcp_multipath.c @@ -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*);