Wake sender after preparing each new fragment
This commit is contained in:
1 parent
75ff7c4ce3
commit
133ea8d120
2 files changed
+5
-2
No files matched your search
@@ -1059,6 +1059,7 @@ static void input_queue_cb(struct ll_queue* q, void* arg) {
|
||||
return;
|
||||
}
|
||||
etcp->unacked_bytes += len;
|
||||
etcp_conn_wake_sender(etcp);
|
||||
|
||||
// DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "successfully moved from input_queue to input_send_q");
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ static struct INFLIGHT_PACKET* enqueue(unsigned len) {
|
||||
CHECK(p->ll.dgram); memset(p->ll.dgram, 0x5a, len);
|
||||
conn->unacked_bytes += len;
|
||||
CHECK(queue_data_put_with_index(conn->input_send_q, &p->ll) == 0);
|
||||
etcp_conn_wake_sender(conn);
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -211,13 +212,14 @@ static void removed_link_and_bbr(void) {
|
||||
ack(1); CHECK(!conn->unacked_bytes);
|
||||
b->bbr = u_calloc(1, sizeof(*b->bbr)); CHECK(b->bbr); bbr_init(b->bbr);
|
||||
b->inflight_lim_bytes = 8192;
|
||||
for (int i = 0; i < 8; i++) enqueue(1024);
|
||||
for (int i = 0; i < 8; i++) {
|
||||
enqueue(1024); struct ETCP_DGRAM* pkt = request(); CHECK(pkt); memory_pool_free(inst.pkt_pool, pkt);
|
||||
struct ETCP_DGRAM* pkt = request(); CHECK(pkt); memory_pool_free(inst.pkt_pool, pkt);
|
||||
}
|
||||
enqueue(100); CHECK(!request() && b->cwnd_limited);
|
||||
// Первый ACK относится к отправке при наличии ожидающих данных: она не app_limited.
|
||||
struct INFLIGHT_PACKET* first = (struct INFLIGHT_PACKET*)conn->input_wait_ack->head;
|
||||
first->is_app_limited = 0;
|
||||
CHECK(!first->is_app_limited);
|
||||
ack(first->seq); CHECK(bbr_calls == 1 && saw_cwnd_limited && !saw_app_limited);
|
||||
teardown();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user