Skip to content

Commit

Permalink
Release 2.19.2
Browse files Browse the repository at this point in the history
- [BUGFIX] Do not reduce PLPMTU size by network overhead.
- [BUGFIX] Windows build.
  • Loading branch information
Dmitri Tikhonov committed Jul 30, 2020
1 parent 41a4965 commit 244e8c6
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2020-07-30
- 2.19.2
- [BUGFIX] Do not reduce PLPMTU size by network overhead.
- [BUGFIX] Windows build.

2020-07-29
- 2.19.1
- [FEATURE] DPLPMTUD support. IETF connections now search for the
Expand Down
20 changes: 20 additions & 0 deletions docs/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,22 @@ settings structure:

Default value is :macro:`LSQUIC_DF_MAX_PLPMTU`

.. member:: unsigned es_mtu_probe_timer

This value specifies how long the DPLPMTUD probe timer is, in
milliseconds. `[draft-ietf-tsvwg-datagram-plpmtud-22] <https://tools.ietf.org/html/draft-ietf-tsvwg-datagram-plpmtud-22>`_ says:

PROBE_TIMER: The PROBE_TIMER is configured to expire after a period
longer than the maximum time to receive an acknowledgment to a
probe packet. This value MUST NOT be smaller than 1 second, and
SHOULD be larger than 15 seconds. Guidance on selection of the
timer value are provided in section 3.1.1 of the UDP Usage
Guidelines :rfc:`8085#section-3.1`.

If set to zero, the default is used.

Default value is :macro:`LSQUIC_DF_MTU_PROBE_TIMER`

.. member:: unsigned es_noprogress_timeout

No progress timeout.
Expand Down Expand Up @@ -973,6 +989,10 @@ out of date. Please check your :file:`lsquic.h` for actual values.*

By default, this value is left up to the engine.

.. macro:: LSQUIC_DF_MTU_PROBE_TIMER

By default, we use the minimum timer of 1000 milliseconds.

.. macro:: LSQUIC_DF_NOPROGRESS_TIMEOUT_SERVER

By default, drop no-progress connections after 60 seconds on the server.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = u'2.19'
# The full version, including alpha/beta/rc tags
release = u'2.19.1'
release = u'2.19.2'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion include/lsquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {

#define LSQUIC_MAJOR_VERSION 2
#define LSQUIC_MINOR_VERSION 19
#define LSQUIC_PATCH_VERSION 1
#define LSQUIC_PATCH_VERSION 2

/**
* Engine flags:
Expand Down
4 changes: 1 addition & 3 deletions src/liblsquic/lsquic_full_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,7 @@ lsquic_gquic_full_conn_client_new (struct lsquic_engine_public *enpub,
if (!max_packet_size)
{
if (enpub->enp_settings.es_base_plpmtu)
max_packet_size = enpub->enp_settings.es_base_plpmtu
- (is_ipv4 ? 20 : 40) /* IP header */
- 8; /* UDP header */
max_packet_size = enpub->enp_settings.es_base_plpmtu;
else if (is_ipv4)
max_packet_size = GQUIC_MAX_IPv4_PACKET_SZ;
else
Expand Down
10 changes: 6 additions & 4 deletions src/liblsquic/lsquic_full_conn_ietf.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ calc_base_packet_size (const struct ietf_full_conn *conn, int is_ipv6)
unsigned short size;

if (conn->ifc_settings->es_base_plpmtu)
size = conn->ifc_settings->es_base_plpmtu - TRANSPORT_OVERHEAD(is_ipv6);
size = conn->ifc_settings->es_base_plpmtu;
else if (is_ipv6)
size = IQUIC_MAX_IPv6_PACKET_SZ;
else
Expand Down Expand Up @@ -6964,13 +6964,15 @@ check_or_schedule_mtu_probe (struct ietf_full_conn *conn, lsquic_time_t now)
return;
}

net_header_sz = TRANSPORT_OVERHEAD(NP_IS_IPv6(&cpath->cop_path));
if (ds->ds_failed_size)
mtu_ceiling = ds->ds_failed_size; /* Don't subtract net_header_sz */
mtu_ceiling = ds->ds_failed_size;
else if (conn->ifc_settings->es_max_plpmtu)
mtu_ceiling = conn->ifc_settings->es_max_plpmtu - net_header_sz;
mtu_ceiling = conn->ifc_settings->es_max_plpmtu;
else
{
net_header_sz = TRANSPORT_OVERHEAD(NP_IS_IPv6(&cpath->cop_path));
mtu_ceiling = 1500 - net_header_sz;
}

if (conn->ifc_max_udp_payload < mtu_ceiling)
{
Expand Down
3 changes: 0 additions & 3 deletions src/liblsquic/lsquic_headers_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/queue.h>
#ifdef MSVC
#include <vc_compat.h>
#endif

#include "lsquic.h"
#include "lsquic_types.h"
Expand Down
4 changes: 1 addition & 3 deletions src/liblsquic/lsquic_mini_conn_ietf.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,7 @@ lsquic_mini_conn_ietf_new (struct lsquic_engine_public *enpub,
conn->imc_enpub = enpub;
conn->imc_created = packet_in->pi_received;
if (enpub->enp_settings.es_base_plpmtu)
conn->imc_path.np_pack_size = enpub->enp_settings.es_base_plpmtu
- (is_ipv4 ? 20 : 40) /* IP header */
- 8; /* UDP header */
conn->imc_path.np_pack_size = enpub->enp_settings.es_base_plpmtu;
else if (is_ipv4)
conn->imc_path.np_pack_size = IQUIC_MAX_IPv4_PACKET_SZ;
else
Expand Down
3 changes: 0 additions & 3 deletions src/liblsquic/lsquic_rechist.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#ifdef MSVC
#include <vc_compat.h>
#endif

#include "lsquic_int_types.h"
#include "lsquic_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/liblsquic/lsquic_send_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3205,7 +3205,7 @@ send_ctl_resize_q (struct lsquic_send_ctl *ctl, struct lsquic_packets_tailq *q,
unsigned count_src = 0, count_dst = 0;
int idx;

#ifdef MSVC
#ifdef _MSC_VER
idx = 0;
#endif

Expand Down
4 changes: 4 additions & 0 deletions tests/test_packet_resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
#include <stdlib.h>
#include <string.h>
#include <sys/queue.h>
#ifndef WIN32
#include <unistd.h>
#else
#include "getopt.h"
#endif

#define LSQUIC_TEST 1
#include "lsquic.h"
Expand Down

0 comments on commit 244e8c6

Please sign in to comment.