summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_cli.c
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2020-09-15 23:40:28 +0800
committerSimon Zhang <yuwei1.zhang@intel.com>2020-09-16 02:18:01 +0000
commit23c3d349e52e57600aaaf3ef32e4264fffb2d0db (patch)
tree12406d14b5d8fc24bcfbba42c514171d983e6abd /src/vnet/tcp/tcp_cli.c
parent2237cc8ce1e0eb7222a34bb30bdeb2f3f1df9a81 (diff)
tcp: make max gso packet size configurable
Type: improvement Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: I14de90f07d825c5c99023996a88173ee855e9a6f
Diffstat (limited to 'src/vnet/tcp/tcp_cli.c')
-rw-r--r--src/vnet/tcp/tcp_cli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_cli.c b/src/vnet/tcp/tcp_cli.c
index edd4d2d1bc1..94ee21f91bc 100644
--- a/src/vnet/tcp/tcp_cli.c
+++ b/src/vnet/tcp/tcp_cli.c
@@ -1050,7 +1050,7 @@ unformat_tcp_cc_algo_cfg (unformat_input_t * input, va_list * va)
static clib_error_t *
tcp_config_fn (vlib_main_t * vm, unformat_input_t * input)
{
- u32 cwnd_multiplier, tmp_time, mtu;
+ u32 cwnd_multiplier, tmp_time, mtu, max_gso_size;
uword memory_size;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -1100,6 +1100,8 @@ tcp_config_fn (vlib_main_t * vm, unformat_input_t * input)
tcp_cfg.allow_tso = 1;
else if (unformat (input, "no-csum-offload"))
tcp_cfg.csum_offload = 0;
+ else if (unformat (input, "max-gso-size %u", &max_gso_size))
+ tcp_cfg.max_gso_size = clib_min (max_gso_size, TCP_MAX_GSO_SZ);
else if (unformat (input, "cc-algo %U", unformat_tcp_cc_algo,
&tcp_cfg.cc_algo))
;