Few comments on TCP implementation

Yogesh Swami (spy9599@yahoo.com)
Fri, 24 May 2002 14:30:11 -0700 (PDT)


Hi,

I have some questions and comments about the TCP
implementation:

a) The calculation of ssthresh is wrong, it should be
max( 1/2*packets_in_flight, 2) (see RFC 2581) and not
as shown below in net/tcp.h. Unfortunately the way
packets in flight is calculated is based on
heuristics, so the only sensible thing to do would be
to set to max( 1/2*packets_out, 2*MSS). This small
change can have a big impact in some cases.

-------- include/net/tcp.h:1098

/* Recalculate snd_ssthresh, we want to set it to:
*
* one half the current congestion window, but no
* less than two segments
*/
static inline __u32 tcp_recalc_ssthresh(struct tcp_opt
*tp)
{
return max(tp->snd_cwnd >> 1U, 2U);
}
-------

b) After a retransmission timeout, all the SACK
information SHOULD be forgotten (see RFC 2018).
Implementation in the kernel does not follow this but
relies on SACK reneging. This should be changed to
what the RFC has to say--again a small change to be
made.

c) There are numerous heuristics at work with no RFC
counterparts (rate halving etc etc). To have the best
performance its probably best to stick with RFCs, or
if there is a compelling need to have these heuristics
then they should be brought to the IETF first.
Implementing something based on someone's random
publications is not a good idea for an operating as
pervasive as Linux.

c) A few new RFCs have come recently (e.g., 3042
called limited retransmit) that boost the performance
of short lived connections ( e.g., HTTP
request-response) and probably it will be a good idea
to incorporate then in the kernel (barely takes a
couple of lines to implement). If no one else is
already working on it, maybe I can assist.

Please let me know what you think.

Thanks
BR
Yogesh

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/