Release 2.6.4

- [BUGFIX] High priority buffered packet queue length.
- [BUGFIX] Rain time calculation: max_ack_delay is in milliseconds.
This commit is contained in:
Dmitri Tikhonov 2019-11-15 09:02:07 -05:00
parent 2f7aa65884
commit c09fcff4ec
8 changed files with 60 additions and 25 deletions

View file

@ -54,6 +54,9 @@ struct lsquic_conn_public {
struct conn_stats *conn_stats;
#endif
const struct network_path *path;
#if LSQUIC_EXTRA_CHECKS
unsigned long stream_frame_bytes;
#endif
};
#endif

View file

@ -260,7 +260,6 @@ lsquic_engine_init_settings (struct lsquic_engine_settings *settings,
{
settings->es_cfcw = LSQUIC_DF_CFCW_SERVER;
settings->es_sfcw = LSQUIC_DF_SFCW_SERVER;
settings->es_support_srej= LSQUIC_DF_SUPPORT_SREJ_SERVER;
settings->es_init_max_data
= LSQUIC_DF_INIT_MAX_DATA_SERVER;
settings->es_init_max_stream_data_bidi_remote
@ -277,7 +276,6 @@ lsquic_engine_init_settings (struct lsquic_engine_settings *settings,
{
settings->es_cfcw = LSQUIC_DF_CFCW_CLIENT;
settings->es_sfcw = LSQUIC_DF_SFCW_CLIENT;
settings->es_support_srej= LSQUIC_DF_SUPPORT_SREJ_CLIENT;
settings->es_init_max_data
= LSQUIC_DF_INIT_MAX_DATA_CLIENT;
settings->es_init_max_stream_data_bidi_remote

View file

@ -2444,7 +2444,7 @@ ietf_full_conn_ci_drain_time (const struct lsquic_conn *lconn)
*/
srtt = lsquic_rtt_stats_get_srtt(&conn->ifc_pub.rtt_stats);
var = lsquic_rtt_stats_get_rttvar(&conn->ifc_pub.rtt_stats);
pto = srtt + 4 * var + TP_DEF_MAX_ACK_DELAY;
pto = srtt + 4 * var + TP_DEF_MAX_ACK_DELAY * 1000;
drain_time = 3 * pto;
LSQ_DEBUG("drain time is %"PRIu64" usec", drain_time);

View file

@ -2220,7 +2220,7 @@ send_ctl_max_bpq_count (const lsquic_send_ctl_t *ctl,
cwnd = ctl->sc_ci->cci_get_cwnd(CGP(ctl));
if (count < cwnd / SC_PACK_SIZE(ctl))
{
count -= cwnd / SC_PACK_SIZE(ctl);
count = cwnd / SC_PACK_SIZE(ctl) - count;
if (count > MAX_BPQ_COUNT)
return count;
}

View file

@ -2693,6 +2693,35 @@ check_flush_threshold (lsquic_stream_t *stream)
}
#if LSQUIC_EXTRA_CHECKS
static void
verify_conn_cap (const struct lsquic_conn_public *conn_pub)
{
const struct lsquic_stream *stream;
struct lsquic_hash_elem *el;
unsigned n_buffered;
if (!conn_pub->all_streams)
/* TODO: enable this check for unit tests as well */
return;
n_buffered = 0;
for (el = lsquic_hash_first(conn_pub->all_streams); el;
el = lsquic_hash_next(conn_pub->all_streams))
{
stream = lsquic_hashelem_getdata(el);
if (stream->sm_bflags & SMBF_CONN_LIMITED)
n_buffered += stream->sm_n_buffered;
}
assert(n_buffered + conn_pub->stream_frame_bytes
== conn_pub->conn_cap.cc_sent);
}
#endif
static int
write_stream_frame (struct frame_gen_ctx *fg_ctx, const size_t size,
struct lsquic_packet_out *packet_out)
@ -2703,7 +2732,7 @@ write_stream_frame (struct frame_gen_ctx *fg_ctx, const size_t size,
unsigned off;
int len, s;
#if LSQUIC_CONN_STATS
#if LSQUIC_CONN_STATS || LSQUIC_EXTRA_CHECKS
const uint64_t begin_off = stream->tosend_off;
#endif
off = packet_out->po_data_sz;
@ -2733,6 +2762,13 @@ write_stream_frame (struct frame_gen_ctx *fg_ctx, const size_t size,
LSQ_ERROR("adding stream to packet failed: %s", strerror(errno));
return -1;
}
#if LSQUIC_EXTRA_CHECKS
if (stream->sm_bflags & SMBF_CONN_LIMITED)
{
stream->conn_pub->stream_frame_bytes += stream->tosend_off - begin_off;
verify_conn_cap(stream->conn_pub);
}
#endif
check_flush_threshold(stream);
return len;