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

@ -1,3 +1,8 @@
2019-11-15
- 2.6.4
- [BUGFIX] High priority buffered packet queue length.
- [BUGFIX] Rain time calculation: max_ack_delay is in milliseconds.
2019-11-12 2019-11-12
- 2.6.3 - 2.6.3
- [BUGFIX] Close DATA frames with empty payload correctly. - [BUGFIX] Close DATA frames with empty payload correctly.

View file

@ -25,7 +25,7 @@ extern "C" {
#define LSQUIC_MAJOR_VERSION 2 #define LSQUIC_MAJOR_VERSION 2
#define LSQUIC_MINOR_VERSION 6 #define LSQUIC_MINOR_VERSION 6
#define LSQUIC_PATCH_VERSION 3 #define LSQUIC_PATCH_VERSION 4
/** /**
* Engine flags: * Engine flags:
@ -323,8 +323,6 @@ typedef struct ssl_ctx_st * (*lsquic_lookup_cert_f)(
#define LSQUIC_DF_STTL 86400 #define LSQUIC_DF_STTL 86400
#define LSQUIC_DF_MAX_INCHOATE (1 * 1000 * 1000) #define LSQUIC_DF_MAX_INCHOATE (1 * 1000 * 1000)
#define LSQUIC_DF_SUPPORT_SREJ_SERVER 1
#define LSQUIC_DF_SUPPORT_SREJ_CLIENT 0 /* TODO: client support */
/** Do not use NSTP by default */ /** Do not use NSTP by default */
#define LSQUIC_DF_SUPPORT_NSTP 0 #define LSQUIC_DF_SUPPORT_NSTP 0
/** TODO: IETF QUIC clients do not support push */ /** TODO: IETF QUIC clients do not support push */
@ -467,13 +465,6 @@ struct lsquic_engine_settings {
*/ */
unsigned es_max_inchoate; unsigned es_max_inchoate;
/**
* Support SREJ: for client side, this means supporting server's SREJ
* responses (this does not work yet) and for server side, this means
* generating SREJ instead of REJ when appropriate.
*/
int es_support_srej;
/** /**
* Setting this value to 0 means that * Setting this value to 0 means that
* *

View file

@ -54,6 +54,9 @@ struct lsquic_conn_public {
struct conn_stats *conn_stats; struct conn_stats *conn_stats;
#endif #endif
const struct network_path *path; const struct network_path *path;
#if LSQUIC_EXTRA_CHECKS
unsigned long stream_frame_bytes;
#endif
}; };
#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_cfcw = LSQUIC_DF_CFCW_SERVER;
settings->es_sfcw = LSQUIC_DF_SFCW_SERVER; settings->es_sfcw = LSQUIC_DF_SFCW_SERVER;
settings->es_support_srej= LSQUIC_DF_SUPPORT_SREJ_SERVER;
settings->es_init_max_data settings->es_init_max_data
= LSQUIC_DF_INIT_MAX_DATA_SERVER; = LSQUIC_DF_INIT_MAX_DATA_SERVER;
settings->es_init_max_stream_data_bidi_remote 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_cfcw = LSQUIC_DF_CFCW_CLIENT;
settings->es_sfcw = LSQUIC_DF_SFCW_CLIENT; settings->es_sfcw = LSQUIC_DF_SFCW_CLIENT;
settings->es_support_srej= LSQUIC_DF_SUPPORT_SREJ_CLIENT;
settings->es_init_max_data settings->es_init_max_data
= LSQUIC_DF_INIT_MAX_DATA_CLIENT; = LSQUIC_DF_INIT_MAX_DATA_CLIENT;
settings->es_init_max_stream_data_bidi_remote 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); srtt = lsquic_rtt_stats_get_srtt(&conn->ifc_pub.rtt_stats);
var = lsquic_rtt_stats_get_rttvar(&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; drain_time = 3 * pto;
LSQ_DEBUG("drain time is %"PRIu64" usec", drain_time); 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)); cwnd = ctl->sc_ci->cci_get_cwnd(CGP(ctl));
if (count < cwnd / SC_PACK_SIZE(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) if (count > MAX_BPQ_COUNT)
return 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 static int
write_stream_frame (struct frame_gen_ctx *fg_ctx, const size_t size, write_stream_frame (struct frame_gen_ctx *fg_ctx, const size_t size,
struct lsquic_packet_out *packet_out) 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; unsigned off;
int len, s; int len, s;
#if LSQUIC_CONN_STATS #if LSQUIC_CONN_STATS || LSQUIC_EXTRA_CHECKS
const uint64_t begin_off = stream->tosend_off; const uint64_t begin_off = stream->tosend_off;
#endif #endif
off = packet_out->po_data_sz; 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)); LSQ_ERROR("adding stream to packet failed: %s", strerror(errno));
return -1; 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); check_flush_threshold(stream);
return len; return len;

View file

@ -157,6 +157,8 @@ static void getExtensionPtrs()
} }
LeaveCriticalSection(&initLock); LeaveCriticalSection(&initLock);
} }
#endif #endif
@ -693,6 +695,8 @@ read_using_recvmmsg (struct read_iter *iter)
return n == sizeof(mmsghdrs) / sizeof(mmsghdrs[0]) ? ROP_NOROOM : ROP_OK; return n == sizeof(mmsghdrs) / sizeof(mmsghdrs[0]) ? ROP_NOROOM : ROP_OK;
} }
#endif #endif
@ -1223,6 +1227,7 @@ packet_out_limit (void)
return 0; return 0;
} }
enum ctl_what enum ctl_what
{ {
CW_SENDADDR = 1 << 0, CW_SENDADDR = 1 << 0,
@ -1440,6 +1445,8 @@ send_packets_using_sendmmsg (const struct lsquic_out_spec *specs,
return s; return s;
} }
#endif #endif
@ -1466,6 +1473,8 @@ find_sport (struct prog *prog, const struct sockaddr *local_sa)
assert(0); assert(0);
return NULL; return NULL;
} }
#endif #endif
@ -1662,11 +1671,6 @@ set_engine_option (struct lsquic_engine_settings *settings,
settings->es_sfcw = atoi(val); settings->es_sfcw = atoi(val);
return 0; return 0;
} }
if (0 == strncmp(name, "srej", 4))
{
settings->es_support_srej = atoi(val);
return 0;
}
break; break;
case 7: case 7:
if (0 == strncmp(name, "version", 7)) if (0 == strncmp(name, "version", 7))
@ -1769,11 +1773,6 @@ set_engine_option (struct lsquic_engine_settings *settings,
settings->es_handshake_to = atoi(val); settings->es_handshake_to = atoi(val);
return 0; return 0;
} }
if (0 == strncmp(name, "support_srej", 12))
{
settings->es_support_srej = atoi(val);
return 0;
}
break; break;
case 13: case 13:
if (0 == strncmp(name, "support_tcid0", 13)) if (0 == strncmp(name, "support_tcid0", 13))
@ -1932,6 +1931,7 @@ pba_allocate (void *packout_buf_allocator, void *peer_ctx, unsigned short size,
return pb; return pb;
} }
void void
pba_release (void *packout_buf_allocator, void *peer_ctx, void *obj, char ipv6) pba_release (void *packout_buf_allocator, void *peer_ctx, void *obj, char ipv6)
{ {
@ -1945,6 +1945,7 @@ pba_release (void *packout_buf_allocator, void *peer_ctx, void *obj, char ipv6)
--pba->n_out; --pba->n_out;
} }
void void
pba_cleanup (struct packout_buf_allocator *pba) pba_cleanup (struct packout_buf_allocator *pba)
{ {
@ -1984,6 +1985,7 @@ print_conn_info (const lsquic_conn_t *conn)
); );
} }
struct reader_ctx struct reader_ctx
{ {
size_t file_size; size_t file_size;