Apply attempt budgets before selecting DATA paths

This commit is contained in:
evgeny committed 2026-10-23 11:09:28 +02:00
1 parent b74ff2633d
commit 783646a967
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -1206,7 +1206,8 @@ struct ETCP_DGRAM* etcp_request_pkt(struct ETCP_CONN* conn) {
if (candidate->burst_active && candidate->initialized && candidate->link_status) { link = candidate; break; }
if (link && packet) {
if (packet->last_attempt_id && etcp_loadbalancer_select_link(conn, packet->ll.len, packet) != link) packet = NULL;
if (packet && (packet->ll.len > link->inflight_lim_bytes ||
if (packet && (conn->active_attempts >= 2 * MAX_INFLIGHT_SIZE || link->attempts->count >= MAX_INFLIGHT_SIZE ||
packet->ll.len > link->inflight_lim_bytes ||
link->inflight_bytes > link->inflight_lim_bytes - packet->ll.len)) {
link->cwnd_limited = 1; packet = NULL;
}
+2 -1
View File
@@ -71,7 +71,8 @@ struct ETCP_LINK* etcp_loadbalancer_select_link(struct ETCP_CONN* etcp, uint32_t
struct ETCP_LINK* link = start;
do {
if (link->initialized && link->link_status) {
int full = data_len && (data_len > link->inflight_lim_bytes ||
int full = data_len && (etcp->active_attempts >= 2 * MAX_INFLIGHT_SIZE ||
link->attempts->count >= MAX_INFLIGHT_SIZE || data_len > link->inflight_lim_bytes ||
link->inflight_bytes > link->inflight_lim_bytes - data_len);
if (full) link->cwnd_limited = 1;
else if ((!data_len || loadbalancer_link_can_send(link)) && (retry || !best || link->inflight_bytes < best->inflight_bytes)) {