1
This commit is contained in:
1 parent
4ce48bbd7d
commit
f094b9cabb
2 files changed
+4
-8
No files matched your search
+3
-7
@@ -700,7 +700,7 @@ static void etcp_conn_process_send_queue(struct ETCP_CONN* etcp) {// вызыв
|
||||
char l_status[256]={0};
|
||||
struct ETCP_LINK* link = etcp->links;
|
||||
while (link) {
|
||||
snprintf (l_status+strlen(l_status), 256-strlen(l_status), "L%d%d%c ", link->recv_keepalive, link->remote_keepalive, (link->shaper_timer==0)?'R':'W');
|
||||
snprintf (l_status+strlen(l_status), 256-strlen(l_status), "L%d%d%s,%s ", link->recv_keepalive, link->remote_keepalive, (link->shaper_timer==0)?"wait":"rdy", link->send_blocked_inflight?"inf_block":"rdy");
|
||||
link = link->next;
|
||||
}
|
||||
|
||||
@@ -763,6 +763,7 @@ struct ETCP_DGRAM* etcp_request_pkt(struct ETCP_CONN* etcp) {
|
||||
inf_pkt->last_link->total_retransmissions++;
|
||||
inf_pkt->last_link->inflight_bytes -= inf_pkt->ll.len;
|
||||
inf_pkt->last_link->inflight_packets--;
|
||||
if (link->send_blocked_inflight && link->inflight_bytes < link->inflight_lim_bytes) loadbalancer_link_ready(link);
|
||||
}
|
||||
|
||||
// Always add to the CURRENT link (first send or retransmission)
|
||||
@@ -970,14 +971,9 @@ void etcp_ack_recv(struct ETCP_CONN* etcp, uint32_t seq, uint16_t ts, uint16_t d
|
||||
|
||||
// === NEW: subtract inflight from the LAST link the packet was sent on ===
|
||||
if (acked_pkt->last_link) {
|
||||
// if (acked_pkt->last_link->inflight_bytes >= acked_pkt->ll.len) {
|
||||
acked_pkt->last_link->inflight_bytes -= acked_pkt->ll.len;
|
||||
// } else {
|
||||
// acked_pkt->last_link->inflight_bytes = 0;
|
||||
// }
|
||||
// if (acked_pkt->last_link->inflight_packets > 0) {
|
||||
acked_pkt->last_link->inflight_packets--;
|
||||
// }
|
||||
if (acked_pkt->last_link->send_blocked_inflight && acked_pkt->last_link->inflight_bytes < acked_pkt->last_link->inflight_lim_bytes) loadbalancer_link_ready(acked_pkt->last_link);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ struct ETCP_LINK* etcp_loadbalancer_select_link(struct ETCP_CONN* etcp) {
|
||||
// link_index, link, link->initialized, link->shaper_timer==NULL?1:0,
|
||||
// (unsigned long long)link->shaper_load_time_tb, (unsigned long long)link->shaper_sub_nanotime);
|
||||
|
||||
if (!link->initialized || link->link_status != 1) {
|
||||
if (!link->initialized || link->link_status != 1) {// link up/down
|
||||
link = link->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user