{
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;
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 */
/** Number of preallocated half-open connections */
u32 preallocated_half_open_connections;
+ /** Maxium allowed GSO packet size */
+ u32 max_gso_size;
+
/** Vectors of src addresses. Optional unless one needs > 63K active-opens */
ip4_address_t *ip4_src_addrs;
ip6_address_t *ip6_src_addrs;
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)
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))
;