summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp.h
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2005-05-23 19:22:48 +0000
committerps <ps@FreeBSD.org>2005-05-23 19:22:48 +0000
commitd8a59510c5b18aa8c2da8bfd45fa2021257d94fb (patch)
treebc16c25a1d4def48537d200a0a7a6a46958ce5a8 /sys/netinet/tcp.h
parent06c1e16bf20f9478ef6b33028aa6dc5a8667f9ce (diff)
downloadFreeBSD-src-d8a59510c5b18aa8c2da8bfd45fa2021257d94fb.zip
FreeBSD-src-d8a59510c5b18aa8c2da8bfd45fa2021257d94fb.tar.gz
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.
Diffstat (limited to 'sys/netinet/tcp.h')
-rw-r--r--sys/netinet/tcp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
index c39ff48..0844485 100644
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -102,7 +102,7 @@ struct tcphdr {
#define TCPOPT_SACK_HDR (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_SACK<<8)
/* Miscellaneous constants */
#define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at sender side */
-#define TCP_MAX_SACK 3 /* MAX # SACKs sent in any segment */
+#define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */
/*
OpenPOWER on IntegriCloud