aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.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_output.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_output.c')
-rw-r--r--src/vnet/tcp/tcp_output.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 4b38649c171..2abc40a8cc7 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -49,10 +49,6 @@ typedef struct
tcp_connection_t tcp_connection;
} tcp_tx_trace_t;
-#ifndef CLIB_MARCH_VARIANT
-u16 dummy_mtu = 1460;
-#endif /* CLIB_MARCH_VARIANT */
-
static u8 *
format_tcp_tx_trace (u8 * s, va_list * args)
{
@@ -89,7 +85,7 @@ void
tcp_update_rcv_mss (tcp_connection_t * tc)
{
/* TODO find our iface MTU */
- tc->mss = dummy_mtu - sizeof (tcp_header_t);
+ tc->mss = tcp_main.default_mtu - sizeof (tcp_header_t);
}
/**
@@ -293,7 +289,7 @@ tcp_make_syn_options (tcp_options_t * opts, u8 wnd_scale)
u8 len = 0;
opts->flags |= TCP_OPTS_FLAG_MSS;
- opts->mss = dummy_mtu; /*XXX discover that */
+ opts->mss = tcp_main.default_mtu; /*XXX discover that */
len += TCP_OPTION_LEN_MSS;
opts->flags |= TCP_OPTS_FLAG_WSCALE;