summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.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.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.c')
-rw-r--r--src/vnet/tcp/tcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 1563be4eb86..a4599c2fd98 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -877,7 +877,7 @@ tcp_session_cal_goal_size (tcp_connection_t * tc)
{
u16 goal_size = tc->snd_mss;
- goal_size = TCP_MAX_GSO_SZ - tc->snd_mss % TCP_MAX_GSO_SZ;
+ goal_size = tcp_cfg.max_gso_size - tc->snd_mss % tcp_cfg.max_gso_size;
goal_size = clib_min (goal_size, tc->snd_wnd / 2);
return goal_size > tc->snd_mss ? goal_size : tc->snd_mss;
@@ -1430,6 +1430,7 @@ tcp_configuration_init (void)
tcp_cfg.csum_offload = 1;
tcp_cfg.cc_algo = TCP_CC_CUBIC;
tcp_cfg.rwnd_min_update_ack = 1;
+ tcp_cfg.max_gso_size = TCP_MAX_GSO_SZ;
/* Time constants defined as timer tick (100ms) multiples */
tcp_cfg.delack_time = 1; /* 0.1s */