aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-09-24 13:58:05 -0700
committerDamjan Marion <dmarion@me.com>2018-09-25 07:42:08 +0000
commitca031860c3dd48929230825aed2c166d032ee1f0 (patch)
tree0dc102b56d222f0666d4f0067b618610770a4d19 /src/vnet/tcp/tcp_output.c
parent2e08b1aa6a44c8346d9cbdc8acec55896327cc63 (diff)
tcp: add option to cfg max rx fifo size
Change-Id: Icff3d688506e7658330db004c58bcfcac273fcec Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r--src/vnet/tcp/tcp_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index f37958e12f2..0d5feb976f8 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -118,12 +118,13 @@ tcp_initial_wnd_unscaled (tcp_connection_t * tc)
u32
tcp_initial_window_to_advertise (tcp_connection_t * tc)
{
+ tcp_main_t *tm = &tcp_main;
u32 max_fifo;
/* Initial wnd for SYN. Fifos are not allocated yet.
* Use some predefined value. For SYN-ACK we still want the
* scale to be computed in the same way */
- max_fifo = TCP_MAX_RX_FIFO_SIZE;
+ max_fifo = tm->max_rx_fifo ? tm->max_rx_fifo : TCP_MAX_RX_FIFO_SIZE;
tc->rcv_wscale = tcp_window_compute_scale (max_fifo);
tc->rcv_wnd = tcp_initial_wnd_unscaled (tc);