|
|
|
|
||||||
| comp.protocols.tcp-ip TCP and IP network protocols. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
Hi, I wanted to discuss the Fast Recovery code in FreeBSD, specifically
when we come out of Fast Recovery. (This is a slightly modified code) ==> IF SACK ENABLE if (tp->t_dupacks >= tcprexmtthresh) { /* Check for a partial ACK */ if (tcp_sack_partialack(tp, th)) { tp->snd_cwnd += tp->t_maxseg; needoutput = 1; } else { /* Out of fast recovery */ tp->snd_cwnd = tp->snd_ssthresh; if (tcp_seq_subtract(tp->snd_max, th->th_ack) < tp->snd_ssthresh) tp->snd_cwnd = tcp_seq_subtract(tp->snd_max, th->th_ack) + tp->t_maxseg; tp->t_dupacks = 0; } } Consider that SACK is enabled. We have more than tcprexmtthresh dupacks so far. This is the ACK that acks the lost and fast retransmitted packet. It is not a partial ACK. So the out of fast recovery code. tp->snd_cwnd = tp->snd_ssthresh; /* set cwnd to ssthresh */ if (tcp_seq_subtract(tp->snd_max, th->th_ack) < tp->snd_ssthresh) tp->snd_cwnd = tcp_seq_subtract(tp->snd_max, th->th_ack) + tp->t_maxseg; So if snd_max - th_ack < snd_ssthresh, i.e. we did not send snd_ssthresh worth of data during Fast Recovery, we set snd_cwnd = (snd_max - th_ack) + t_maxseg This looks like a problem to me. The RFC says just set cwnd to ssthresh. In this code if we sent little, we would scale down the congestion window for no reason. Shouldnt we just set it to snd_ssthresh. Am I reading this wrong, or is this how it is supposed to be. Comments. |
|
![]() |
| Outils de la discussion | |
|
|