Skip to content

Commit

Permalink
Release 3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gwanglst committed Jan 26, 2023
1 parent 8398934 commit b373fe5
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 19 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2023-01-26
- 3.3.1
- Fix blocked header encoding stream due to connection flow control congestion.
- Fix qeh_write_headers bug for Windows.
- Fix corner case for packet resizing.

2023-01-04
- 3.3.0
- Improve path validation logic to avoid sending padded packet to unverified
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'3.3'
# The full version, including alpha/beta/rc tags
release = u'3.3.0'
release = u'3.3.1'


# -- 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 @@ -27,7 +27,7 @@ extern "C" {

#define LSQUIC_MAJOR_VERSION 3
#define LSQUIC_MINOR_VERSION 3
#define LSQUIC_PATCH_VERSION 0
#define LSQUIC_PATCH_VERSION 1

/**
* Engine flags:
Expand Down
2 changes: 1 addition & 1 deletion src/liblsquic/ls-qpack
Submodule ls-qpack updated 3 files
+2 −0 CMakeLists.txt
+1 −1 lsqpack.c
+1 −1 lsqpack.h
1 change: 1 addition & 0 deletions src/liblsquic/lsquic_hpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ lsquic_hpi_init (void *iter_p, struct lsquic_stream *first,
else
while (1)
{
HPI_DEBUG("add stream %"PRIu64, stream->id);
add_stream_to_hpi(iter, stream);
++count;
if (stream == last)
Expand Down
23 changes: 16 additions & 7 deletions src/liblsquic/lsquic_packet_resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,23 @@ packet_resize_next_frec (struct packet_resize_ctx *prctx)
prctx->prc_cur_packet = NULL; /* Not necessary; just future-proofing */
}

prctx->prc_cur_packet = prctx->prc_pri->pri_next_packet(prctx->prc_data);
if (!prctx->prc_cur_packet)
do
{
LSQ_DEBUG("out of input packets");
return NULL;
}
frec = lsquic_pofi_first(&prctx->prc_pofi, prctx->prc_cur_packet);
assert(frec);
prctx->prc_cur_packet = prctx->prc_pri->pri_next_packet(prctx->prc_data);
if (!prctx->prc_cur_packet)
{
LSQ_DEBUG("out of input packets");
return NULL;
}
frec = lsquic_pofi_first(&prctx->prc_pofi, prctx->prc_cur_packet);
if (frec == NULL)
{
LSQ_DEBUG("discard, no good frec from current packet %"PRIu64,
prctx->prc_cur_packet->po_packno);
prctx->prc_pri->pri_discard_packet(prctx->prc_data,
prctx->prc_cur_packet);
}
} while (frec == NULL);
LSQ_DEBUG("return first frec from new current packet %"PRIu64,
prctx->prc_cur_packet->po_packno);
return frec;
Expand Down
3 changes: 2 additions & 1 deletion src/liblsquic/lsquic_qenc_hdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ qeh_write_headers (struct qpack_enc_hdl *qeh, lsquic_stream_id_t stream_id,
{
if (headers->headers[i].buf == NULL)
continue;
enc_sz = sizeof(enc_buf);
enc_sz = qeh->qeh_encoder.qpe_cur_max_capacity * 2;
hea_sz = end - p;
st = lsqpack_enc_encode(&qeh->qeh_encoder, enc_buf, &enc_sz, p,
&hea_sz, &headers->headers[i], enc_flags);
Expand Down Expand Up @@ -515,6 +515,7 @@ qeh_write_headers (struct qpack_enc_hdl *qeh, lsquic_stream_id_t stream_id,
"%.3f", total_enc_sz, lsquic_frab_list_size(&qeh->qeh_fral),
*headers_sz, lsqpack_enc_ratio(&qeh->qeh_encoder));
retval = QWH_PARTIAL;
lsquic_stream_wantwrite(qeh->qeh_enc_sm_out, 1);
goto end;
}

Expand Down
7 changes: 5 additions & 2 deletions src/liblsquic/lsquic_send_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1643,9 +1643,12 @@ static int
send_ctl_can_send (struct lsquic_send_ctl *ctl)
{
const unsigned n_out = send_ctl_all_bytes_out(ctl);
LSQ_DEBUG("%s: n_out: %u (unacked_all: %u); cwnd: %"PRIu64, __func__,
LSQ_DEBUG("%s: n_out: %u (unacked_all: %u); cwnd: %"PRIu64
"; ccfc: %"PRIu64"/%"PRIu64, __func__,
n_out, ctl->sc_bytes_unacked_all,
ctl->sc_ci->cci_get_cwnd(CGP(ctl)));
ctl->sc_ci->cci_get_cwnd(CGP(ctl)),
ctl->sc_conn_pub->conn_cap.cc_sent,
ctl->sc_conn_pub->conn_cap.cc_max);
if (ctl->sc_flags & SC_PACE)
{
if (n_out >= ctl->sc_ci->cci_get_cwnd(CGP(ctl)))
Expand Down
19 changes: 13 additions & 6 deletions src/liblsquic/lsquic_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,9 @@ decr_conn_cap (struct lsquic_stream *stream, size_t incr)
{
assert(stream->conn_pub->conn_cap.cc_sent >= incr);
stream->conn_pub->conn_cap.cc_sent -= incr;
LSQ_DEBUG("decrease cc_sent by %zd to %"PRIu64, incr,
stream->conn_pub->conn_cap.cc_sent);

}
}

Expand Down Expand Up @@ -2048,8 +2051,11 @@ maybe_put_onto_write_q (lsquic_stream_t *stream, enum stream_q_flags flag)
{
assert(SMQF_WRITE_Q_FLAGS & flag);
if (!(stream->sm_qflags & SMQF_WRITE_Q_FLAGS))
{
LSQ_DEBUG("put on write queue");
TAILQ_INSERT_TAIL(&stream->conn_pub->write_streams, stream,
next_write_stream);
}
stream->sm_qflags |= flag;
}

Expand Down Expand Up @@ -2402,6 +2408,8 @@ lsquic_stream_dispatch_write_events (lsquic_stream_t *stream)
unsigned short n_buffered;
enum stream_q_flags q_flags;

LSQ_DEBUG("dispatch_write_events");

if (!(stream->sm_qflags & SMQF_WRITE_Q_FLAGS)
|| (stream->stream_flags & STREAM_FINISHED))
return;
Expand Down Expand Up @@ -2761,6 +2769,8 @@ incr_conn_cap (struct lsquic_stream *stream, size_t incr)
stream->conn_pub->conn_cap.cc_sent += incr;
assert(stream->conn_pub->conn_cap.cc_sent
<= stream->conn_pub->conn_cap.cc_max);
LSQ_DEBUG("increase cc_sent by %zd to %"PRIu64, incr,
stream->conn_pub->conn_cap.cc_sent);
}
}

Expand Down Expand Up @@ -3976,17 +3986,15 @@ lsquic_stream_pwritev (struct lsquic_stream *stream,
bits = p[1] >> 6;
vint_write(p + 1, payload_sz - shortfall, bits, 1 << bits);
decr = shortfall;
if (stream->sm_bflags & SMBF_CONN_LIMITED)
stream->conn_pub->conn_cap.cc_sent -= decr;
decr_conn_cap(stream, decr);
stream->sm_payload -= decr;
stream->tosend_off -= decr;
shortfall = 0;
}
else
{
decr = payload_sz + 2 + (p[1] >> 6);
if (stream->sm_bflags & SMBF_CONN_LIMITED)
stream->conn_pub->conn_cap.cc_sent -= decr;
decr_conn_cap(stream, decr);
stream->sm_payload -= payload_sz;
stream->tosend_off -= decr;
shortfall -= payload_sz;
Expand All @@ -3998,8 +4006,7 @@ lsquic_stream_pwritev (struct lsquic_stream *stream,
else
{
const size_t shortfall = n_allocated - (size_t) nw;
if (stream->sm_bflags & SMBF_CONN_LIMITED)
stream->conn_pub->conn_cap.cc_sent -= shortfall;
decr_conn_cap(stream, shortfall);
stream->sm_payload -= shortfall;
stream->tosend_off -= shortfall;
}
Expand Down

0 comments on commit b373fe5

Please sign in to comment.