summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-09-27 09:19:29 -0700
committerFlorin Coras <fcoras@cisco.com>2018-09-27 09:47:26 -0700
commit45ca73f6af1584a44886d5a13702885be58df1b6 (patch)
tree1295b939acda6ae340230a794f7dbe1af53a5e0e /src/vnet/tcp/tcp.c
parent7d7b8c6dd7dc7a3efa89bb7b7c34742939b225fd (diff)
tcp: use scaled window for new connects
Change-Id: Idf83fce8ca176e57b323e3741034e3223f1d195a Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index d00f4abb118..30e5899577a 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1017,8 +1017,8 @@ tcp_round_snd_space (tcp_connection_t * tc, u32 snd_space)
* @param tc tcp connection
* @return number of bytes session is allowed to write
*/
-static u32
-tcp_snd_space (tcp_connection_t * tc)
+static inline u32
+tcp_snd_space_inline (tcp_connection_t * tc)
{
int snd_space, snt_limited;
@@ -1066,11 +1066,17 @@ tcp_snd_space (tcp_connection_t * tc)
return 0;
}
+u32
+tcp_snd_space (tcp_connection_t * tc)
+{
+ return tcp_snd_space_inline (tc);
+}
+
static u32
tcp_session_send_space (transport_connection_t * trans_conn)
{
tcp_connection_t *tc = (tcp_connection_t *) trans_conn;
- return clib_min (tcp_snd_space (tc),
+ return clib_min (tcp_snd_space_inline (tc),
tc->snd_wnd - (tc->snd_nxt - tc->snd_una));
}