summaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorGao Feng <fgao@ikuai8.com>2017-04-04 15:09:48 +0200
committerDavid S. Miller <davem@davemloft.net>2017-04-05 16:50:32 +0200
commit589c49cbf9674808fd4ac9b7c17155abc0686f86 (patch)
tree7065ecc4a28f72a6fd73570a0b793d92fee62e88 /include/net/tcp.h
parentnet: ibm: emac: remove unused sysrq handler for 'c' key (diff)
downloadlinux-589c49cbf9674808fd4ac9b7c17155abc0686f86.tar.xz
linux-589c49cbf9674808fd4ac9b7c17155abc0686f86.zip
net: tcp: Define the TCP_MAX_WSCALE instead of literal number 14
Define one new macro TCP_MAX_WSCALE instead of literal number '14', and use U16_MAX instead of 65535 as the max value of TCP window. There is another minor change, use rounddown(space, mss) instead of (space / mss) * mss; Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 582e3772c0d9..cc6ae0a95201 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -78,6 +78,9 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);
/* Maximal number of ACKs sent quickly to accelerate slow-start. */
#define TCP_MAX_QUICKACKS 16U
+/* Maximal number of window scale according to RFC1323 */
+#define TCP_MAX_WSCALE 14U
+
/* urg_data states */
#define TCP_URG_VALID 0x0100
#define TCP_URG_NOTYET 0x0200