- 论坛徽章:
- 3
|
回复 88# quazar
- tcp_input.c:
- 2178 static void tcp_ack_packets_out(struct sock *sk, struct tcp_sock *tp)
- 2179 {
- 2180 if (!tp->packets_out) {
- 2181 inet_csk_clear_xmit_timer(sk, ICSK_TIME_RETRANS);
- 2182 } else {
- 2183 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, inet_csk(sk)->icsk_rto, TCP_RTO_MAX);
- 2184 }
- 2185 }
- ...
- 2252 static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
- ...
- 2334 if (acked&FLAG_ACKED) {
- 2335 tcp_ack_update_rtt(sk, acked, seq_rtt);
- 2336 tcp_ack_packets_out(sk, tp);
- 2337 if (rtt_sample && !(acked & FLAG_RETRANS_DATA_ACKED))
- 2338 (*rtt_sample)(sk, tcp_usrtt(&tv));
- 2339
- 2340 if (icsk->icsk_ca_ops->pkts_acked)
- 2341 icsk->icsk_ca_ops->pkts_acked(sk, pkts_acked);
- 2342 }
- ...
- 2490 /* This routine deals with incoming acks, but not outgoing ones. */
- 2491 static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
- ....
- 2559 /* See if we can take anything off of the retransmit queue. */
- 2560 flag |= tcp_clean_rtx_queue(sk, &seq_rtt);
复制代码 tcp_ack() -> tcp_clean_rtx_queue() : 检查是否收到非重传数据的 ACK -> 是则更新 RTT,RTO,然后处理重传定时器 |
评分
-
查看全部评分
|