Release 2.19.0

- [FEATURE] DPLPMTUD support.  IETF connections now search for the
  maximum packet size, improving throughput.
- [DEBUG] Record event in stream history when on_close() is called
  in dtor.
This commit is contained in:
Dmitri Tikhonov 2020-07-29 11:33:52 -04:00
parent b329a00e5e
commit b8fa619567
46 changed files with 3629 additions and 854 deletions

View file

@ -140,8 +140,8 @@ prog_print_common_options (const struct prog *prog, FILE *out)
#if LSQUIC_DONTFRAG_SUPPORTED
" -D Do not set `do not fragment' flag on outgoing UDP packets\n"
#endif
" -z BYTES Maximum size of outgoing UDP packets. The default is 1370\n"
" bytes for IPv4 socket and 1350 bytes for IPv6 socket\n"
" -z BYTES Maximum size of outgoing UDP packets (client only).\n"
" Overrides -o base_plpmtu.\n"
" -L LEVEL Log level for all modules. Possible values are `debug',\n"
" `info', `notice', `warn', `error', `alert', `emerg',\n"
" and `crit'.\n"

View file

@ -1816,6 +1816,11 @@ set_engine_option (struct lsquic_engine_settings *settings,
settings->es_scid_len = atoi(val);
return 0;
}
if (0 == strncmp(name, "dplpmtud", 8))
{
settings->es_dplpmtud = atoi(val);
return 0;
}
break;
case 9:
if (0 == strncmp(name, "send_prst", 9))
@ -1835,6 +1840,11 @@ set_engine_option (struct lsquic_engine_settings *settings,
settings->es_timestamps = atoi(val);
return 0;
}
if (0 == strncmp(name, "max_plpmtu", 10))
{
settings->es_max_plpmtu = atoi(val);
return 0;
}
break;
case 11:
if (0 == strncmp(name, "ping_period", 11))
@ -1842,6 +1852,11 @@ set_engine_option (struct lsquic_engine_settings *settings,
settings->es_ping_period = atoi(val);
return 0;
}
if (0 == strncmp(name, "base_plpmtu", 11))
{
settings->es_base_plpmtu = atoi(val);
return 0;
}
break;
case 12:
if (0 == strncmp(name, "idle_conn_to", 12))
@ -1975,7 +1990,7 @@ set_engine_option (struct lsquic_engine_settings *settings,
}
break;
case 23:
if (0 == strncmp(name, "max_udp_payload_size_rx", 18))
if (0 == strncmp(name, "max_udp_payload_size_rx", 23))
{
settings->es_max_udp_payload_size_rx = atoi(val);
return 0;
@ -2008,7 +2023,9 @@ set_engine_option (struct lsquic_engine_settings *settings,
}
#define MAX_PACKOUT_BUF_SZ 1370
/* So that largest allocation in PBA fits in 4KB */
#define PBA_SIZE_MAX 0x1000
#define PBA_SIZE_THRESH (PBA_SIZE_MAX - sizeof(uintptr_t))
struct packout_buf
{
@ -2032,12 +2049,6 @@ pba_allocate (void *packout_buf_allocator, void *peer_ctx, unsigned short size,
struct packout_buf_allocator *const pba = packout_buf_allocator;
struct packout_buf *pb;
if (size > MAX_PACKOUT_BUF_SZ)
{
fprintf(stderr, "packout buf size too large: %hu", size);
abort();
}
if (pba->max && pba->n_out >= pba->max)
{
LSQ_DEBUG("# outstanding packout bufs reached the limit of %u, "
@ -2047,16 +2058,24 @@ pba_allocate (void *packout_buf_allocator, void *peer_ctx, unsigned short size,
#if LSQUIC_USE_POOLS
pb = SLIST_FIRST(&pba->free_packout_bufs);
if (pb)
if (pb && size <= PBA_SIZE_THRESH)
SLIST_REMOVE_HEAD(&pba->free_packout_bufs, next_free_pb);
else if (size <= PBA_SIZE_THRESH)
pb = malloc(PBA_SIZE_MAX);
else
pb = malloc(sizeof(uintptr_t) + size);
#else
pb = malloc(sizeof(uintptr_t) + size);
#endif
pb = malloc(MAX_PACKOUT_BUF_SZ);
if (pb)
{
* (uintptr_t *) pb = size;
++pba->n_out;
return pb;
return (uintptr_t *) pb + 1;
}
else
return NULL;
}
@ -2064,12 +2083,16 @@ void
pba_release (void *packout_buf_allocator, void *peer_ctx, void *obj, char ipv6)
{
struct packout_buf_allocator *const pba = packout_buf_allocator;
obj = (uintptr_t *) obj - 1;
#if LSQUIC_USE_POOLS
struct packout_buf *const pb = obj;
SLIST_INSERT_HEAD(&pba->free_packout_bufs, pb, next_free_pb);
#else
free(obj);
if (* (uintptr_t *) obj <= PBA_SIZE_THRESH)
{
struct packout_buf *const pb = obj;
SLIST_INSERT_HEAD(&pba->free_packout_bufs, pb, next_free_pb);
}
else
#endif
free(obj);
--pba->n_out;
}