Hello,
I am interested in two points of TCP implementation for kernel 2.6.
The first point is about the 'quickack mode' used to make the congestion window to grow faster during the 'slow-start' phase. The code on tcp_input.c shows that number of quick acks to be sent is equal to the half of the receiver window worth of packets:
tcp_input.c/tcp_incr_quickack
Code:
unsigned quickacks = tp->rcv_wnd/(2*tp->ack.rcv_mss);
Is the value of rcv_wnd is always equal to the value of advertised window sent in a TCP segment? More precisely, is it possible to know (aprox.) how many quick acks are scheduled to be sent by looking a network trace (i.e. tcpdump)?
The second point is that I understood that the linux implementation can send a delayed ack for more than two packets as the delayed ack mechanism is not based on the number of packets, but in the 'ato' (ack time out?!). And thus *not* following recommendation the RFC 2581 ("The requirement that an ACK "SHOULD" be generated for at least every second full-sized segment..."). Which is OK, as it is a SHOULD.
What I cannot understand is how the timer is controlled. I do not understand how "about to expire" is tested on the code bellow:
tcp_output.c/tcp_send_delayed_ack
Code:
/* If delack timer was blocked or is about to expire,
* send ACK now.
*/
if (tp->ack.blocked || time_before_eq(tp->ack.timeout, jiffies+(ato>>2))) {
tcp_send_ack(sk);
return;
}
Can somebody help me with those?
Thanks,
Rafael