]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rewrite of tcp_sack_option(). Kentaro Kurahone (NetBSD) pointed out
authorPaul Saab <ps@FreeBSD.org>
Mon, 23 May 2005 19:22:48 +0000 (19:22 +0000)
committerPaul Saab <ps@FreeBSD.org>
Mon, 23 May 2005 19:22:48 +0000 (19:22 +0000)
commit64b5fbaa04a76f488c9a98b1c38b34292c99623c
treebc16c25a1d4def48537d200a0a7a6a46958ce5a8
parentdc156a91f9a1d30396c180df6bb71c36b2ef9818
Rewrite of tcp_sack_option(). Kentaro Kurahone (NetBSD) pointed out
that if we sort the incoming SACK blocks, we can update the scoreboard
in one pass of the scoreboard. The added overhead of sorting upto 4
sack blocks is much lower than traversing (potentially) large
scoreboards multiple times. The code was updating the scoreboard with
multiple passes over it (once for each sack option). The rewrite fixes
that, reducing the complexity of the main loop from O(n^2) to O(n).

Submitted by:   Mohan Srinivasan, Noritoshi Demizu.
Reviewed by:    Raja Mukerji.
sys/netinet/tcp.h
sys/netinet/tcp_sack.c