From ca031860c3dd48929230825aed2c166d032ee1f0 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 24 Sep 2018 13:58:05 -0700 Subject: tcp: add option to cfg max rx fifo size Change-Id: Icff3d688506e7658330db004c58bcfcac273fcec Signed-off-by: Florin Coras --- src/vnet/tcp/tcp_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vnet/tcp/tcp_output.c') 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); -- cgit 1.2.3-korg