]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve performance in the case where ip_output() returns an error.
authorarchie <archie@FreeBSD.org>
Thu, 3 Aug 2000 23:23:36 +0000 (23:23 +0000)
committerarchie <archie@FreeBSD.org>
Thu, 3 Aug 2000 23:23:36 +0000 (23:23 +0000)
commitbe99417f31f7a677b27c7b8f2b86180311a38f0a
tree7f11169b081cfd178c12277c99a055d8c0842bdf
parentaf22f35f95ebc072f1c0691d8af39112dd4ba623
Improve performance in the case where ip_output() returns an error.
When this happens, we know for sure that the packet data was not
received by the peer. Therefore, back out any advancing of the
transmit sequence number so that we send the same data the next
time we transmit a packet, avoiding a guaranteed missed packet and
its resulting TCP transmit slowdown.

In most systems ip_output() probably never returns an error, and
so this problem is never seen. However, it is more likely to occur
with device drivers having short output queues (causing ENOBUFS to
be returned when they are full), not to mention low memory situations.

Moreover, because of this problem writers of slow devices were
required to make an unfortunate choice between (a) having a relatively
short output queue (with low latency but low TCP bandwidth because
of this problem) or (b) a long output queue (with high latency and
high TCP bandwidth). In my particular application (ISDN) it took
an output queue equal to ~5 seconds of transmission to avoid ENOBUFS.
A more reasonable output queue of 0.5 seconds resulted in only about
50% TCP throughput. With this patch full throughput was restored in
the latter case.

Reviewed by: freebsd-net
sys/netinet/tcp_output.c