aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tcp.h
diff options
context:
space:
mode:
authorAdam Langley <agl@imperialviolet.org>2008-07-19 03:07:02 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-19 03:07:02 -0400
commit4389dded7767d24290463f2a8302ba3253ebdd56 (patch)
treeed34a2084c47c6c707e0ce6b4eab8d442f20c4c3 /include/linux/tcp.h
parent33ad798c924b4a1afad3593f2796d465040aadd5 (diff)
tcp: Remove redundant checks when setting eff_sacks
Remove redundant checks when setting eff_sacks and make the number of SACKs a compile time constant. Now that the options code knows how many SACK blocks can fit in the header, we don't need to have the SACK code guessing at it. Signed-off-by: Adam Langley <agl@imperialviolet.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r--include/linux/tcp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 07e79bdb9cdf..2e2557388e36 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -224,6 +224,12 @@ struct tcp_options_received {
224 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ 224 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
225}; 225};
226 226
227/* This is the max number of SACKS that we'll generate and process. It's safe
228 * to increse this, although since:
229 * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
230 * only four options will fit in a standard TCP header */
231#define TCP_NUM_SACKS 4
232
227struct tcp_request_sock { 233struct tcp_request_sock {
228 struct inet_request_sock req; 234 struct inet_request_sock req;
229#ifdef CONFIG_TCP_MD5SIG 235#ifdef CONFIG_TCP_MD5SIG