summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-22 15:42:18 -0700
committerJohn Lo <loj@cisco.com>2019-03-23 03:45:16 +0000
commit537e85deab6fd916952ff4badeda4ec5d6f1a121 (patch)
tree00260c027b0963b1ab965623fbe425e837fb2fd8 /src/vnet/tcp/tcp.c
parent6c1f56f08c30eb2ad5d734f9891f8b7f4ef9760d (diff)
tcp: make default mtu configurable
Change-Id: I56d8d8d67d5590e24c1ddb54b0c63a2cb03798e1 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 39d683c78e7..32abe2df210 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -841,9 +841,10 @@ format_tcp_vars (u8 * s, va_list * args)
tcp_flight_size (tc), tcp_available_output_snd_space (tc),
tcp_rcv_wnd_available (tc));
s = format (s, " tsval_recent %u\n", tc->tsval_recent);
- s = format (s, " tsecr %u tsecr_last_ack %u tsval_recent_age %u\n",
+ s = format (s, " tsecr %u tsecr_last_ack %u tsval_recent_age %u",
tc->rcv_opts.tsecr, tc->tsecr_last_ack,
tcp_time_now () - tc->tsval_recent_age);
+ s = format (s, " snd_mss %u\n", tc->snd_mss);
s = format (s, " rto %u rto_boff %u srtt %u us %.3f rttvar %u rtt_ts %.4f",
tc->rto, tc->rto_boff, tc->srtt, tc->mrtt_us * 1000, tc->rttvar,
tc->rtt_ts);
@@ -1534,6 +1535,7 @@ tcp_init (vlib_main_t * vm)
tcp_api_reference ();
tm->tx_pacing = 1;
tm->cc_algo = TCP_CC_NEWRENO;
+ tm->default_mtu = 1460;
return 0;
}
@@ -1596,6 +1598,8 @@ tcp_config_fn (vlib_main_t * vm, unformat_input_t * input)
else if (unformat (input, "max-rx-fifo %U", unformat_memory_size,
&tm->max_rx_fifo))
;
+ else if (unformat (input, "mtu %d", &tm->default_mtu))
+ ;
else if (unformat (input, "no-tx-pacing"))
tm->tx_pacing = 0;
else if (unformat (input, "cc-algo %U", unformat_tcp_cc_algo,