Skip to content

Commit

Permalink
Release 2.19.6
Browse files Browse the repository at this point in the history
- Don't process incoming ECN marks if ECN is not enabled.
- Schedule ACK when incoming packet is marked with CE.
  • Loading branch information
Dmitri Tikhonov committed Aug 20, 2020
1 parent 5488f41 commit 93e1e88
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2020-08-20
- 2.19.6
- Don't process incoming ECN marks if ECN is not enabled.
- Schedule ACK when incoming packet is marked with CE.

2020-08-11
- 2.19.5
- [BUGFIX] Generate frame record when moving an ACK from one buffered
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.5'
release = u'2.19.6'


# -- 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 5
#define LSQUIC_PATCH_VERSION 6

/**
* Engine flags:
Expand Down
25 changes: 20 additions & 5 deletions src/liblsquic/lsquic_full_conn_ietf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,16 +1662,23 @@ generate_ack_frame_for_pns (struct ietf_full_conn *conn,
struct lsquic_packet_out *packet_out, enum packnum_space pns,
lsquic_time_t now)
{
const uint64_t *ecn_counts;
int has_missing, w;

if (conn->ifc_incoming_ecn
&& lsquic_send_ctl_ecn_turned_on(&conn->ifc_send_ctl))
ecn_counts = conn->ifc_ecn_counts_in[pns];
else
ecn_counts = NULL;

w = conn->ifc_conn.cn_pf->pf_gen_ack_frame(
packet_out->po_data + packet_out->po_data_sz,
lsquic_packet_out_avail(packet_out),
(gaf_rechist_first_f) lsquic_rechist_first,
(gaf_rechist_next_f) lsquic_rechist_next,
(gaf_rechist_largest_recv_f) lsquic_rechist_largest_recv,
&conn->ifc_rechist[pns], now, &has_missing, &packet_out->po_ack2ed,
conn->ifc_incoming_ecn ? conn->ifc_ecn_counts_in[pns] : NULL);
ecn_counts);
if (w < 0) {
ABORT_ERROR("generating ACK frame failed: %d", errno);
return -1;
Expand Down Expand Up @@ -6159,11 +6166,18 @@ many_in_and_will_write (struct ietf_full_conn *conn)

static void
try_queueing_ack_app (struct ietf_full_conn *conn,
int was_missing, lsquic_time_t now)
int was_missing, int ecn, lsquic_time_t now)
{
lsquic_time_t srtt, ack_timeout;

if (conn->ifc_n_slack_akbl[PNS_APP] >= conn->ifc_max_retx_since_last_ack
/* From [draft-ietf-quic-transport-29] Section 13.2.1:
" Similarly, packets marked with the ECN Congestion Experienced (CE)
" codepoint in the IP header SHOULD be acknowledged immediately, to
" reduce the peer's response time to congestion events.
*/
|| (ecn == ECN_CE
&& lsquic_send_ctl_ecn_turned_on(&conn->ifc_send_ctl))
|| ((conn->ifc_flags & IFC_ACK_HAD_MISS)
&& was_missing && conn->ifc_n_slack_akbl[PNS_APP] > 0)
|| many_in_and_will_write(conn))
Expand Down Expand Up @@ -6208,10 +6222,10 @@ try_queueing_ack_init_or_hsk (struct ietf_full_conn *conn,

static void
try_queueing_ack (struct ietf_full_conn *conn, enum packnum_space pns,
int was_missing, lsquic_time_t now)
int was_missing, int ecn, lsquic_time_t now)
{
if (PNS_APP == pns)
try_queueing_ack_app(conn, was_missing, now);
try_queueing_ack_app(conn, was_missing, ecn, now);
else
try_queueing_ack_init_or_hsk(conn, pns);
}
Expand Down Expand Up @@ -6612,7 +6626,8 @@ process_regular_packet (struct ietf_full_conn *conn,
else
was_missing = 0;
conn->ifc_n_slack_all += PNS_APP == pns;
try_queueing_ack(conn, pns, was_missing, packet_in->pi_received);
try_queueing_ack(conn, pns, was_missing,
lsquic_packet_in_ecn(packet_in), packet_in->pi_received);
}
conn->ifc_incoming_ecn <<= 1;
conn->ifc_incoming_ecn |=
Expand Down
2 changes: 2 additions & 0 deletions src/liblsquic/lsquic_send_ctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,4 +407,6 @@ int
lsquic_send_ctl_can_send_probe (const struct lsquic_send_ctl *,
const struct network_path *);

#define lsquic_send_ctl_ecn_turned_on(ctl_) ((ctl_)->sc_flags & SC_ECN)

#endif

0 comments on commit 93e1e88

Please sign in to comment.