Verify ACK deadlines through link down and removal
This commit is contained in:
1 parent
51c667edd8
commit
73096e8e3e
1 file changed
+23
-1
@@ -1264,6 +1264,28 @@ static void ack_sender_failure(void) {
|
||||
etcp_conn_ref_free(conn); teardown();
|
||||
}
|
||||
|
||||
/* DOWN не мешает срокам других путей; UP возвращает старые ACK сразу. Удаление головы не оставляет чужой deadline. */
|
||||
static void ack_link_lifecycle(void) {
|
||||
for (unsigned remove = 0; remove < 2; remove++) {
|
||||
setup(); conn->got_initial_pkt = 1;
|
||||
ack_now_us = get_time_us(); ack_clock_active = 1;
|
||||
uint64_t begin = ack_now_us;
|
||||
receive_fragment(a, 2, 1); ack_now_us += 1000; receive_fragment(b, 3, 1);
|
||||
if (remove) { etcp_link_close(a); a = NULL; }
|
||||
else a->link_status = 0;
|
||||
ack_now_us = begin + 2000; CHECK(!request() && conn->ack_resp_deadline_us == begin + 3000);
|
||||
ack_now_us = begin + 3000;
|
||||
struct ETCP_DGRAM* pkt = request(); CHECK(pkt && pkt->link == b && pkt->data[1] == 1);
|
||||
memory_pool_free(inst.pkt_pool, pkt); CHECK(!conn->ack_resp_timer);
|
||||
if (!remove) {
|
||||
a->link_status = 1; etcp_conn_wake_sender(conn);
|
||||
pkt = request(); CHECK(pkt && pkt->link == a && pkt->data[1] == 1);
|
||||
memory_pool_free(inst.pkt_pool, pkt);
|
||||
}
|
||||
teardown();
|
||||
}
|
||||
}
|
||||
|
||||
static void receive_admission_and_path_acks(void) {
|
||||
setup(); conn->got_initial_pkt = 1;
|
||||
fail_rx_data = 1; receive_fragment(a, 2, 1);
|
||||
@@ -1690,7 +1712,7 @@ int main(void) {
|
||||
send_queue_scan, send_queue_input_admission,
|
||||
retry_full_round_history, retry_history_slot_reuse, fast_stall_progress, stalled_retry_selection, input_admission_callbacks,
|
||||
ack_absolute_deadline, ack_piggyback_deadlines, ack_partial_piggyback, ack_timer_interleaving,
|
||||
ack_urgent_and_oom, ack_partial_frame_and_lifecycle, ack_sender_failure,
|
||||
ack_urgent_and_oom, ack_partial_frame_and_lifecycle, ack_sender_failure, ack_link_lifecycle,
|
||||
receive_admission_and_path_acks, peer_window_queries, pacing_continuity, pacing_data_units, attempt_memory_limits,
|
||||
normalizer_rx_oom, normalizer_tx_oom, normalizer_callback_abort, reset_without_allocation, restart_allocation_failures,
|
||||
receiver_bandwidth_bounds, receiver_point_lifecycle, receiver_point_wire, receiver_point_truncated,
|
||||
|
||||
Reference in new issue
Block a user