Skip to content

Commit b373fe5

Browse files
committed
Release 3.3.1
1 parent 8398934 commit b373fe5

File tree

9 files changed

+46
-19
lines changed

9 files changed

+46
-19
lines changed

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2023-01-26
2+
- 3.3.1
3+
- Fix blocked header encoding stream due to connection flow control congestion.
4+
- Fix qeh_write_headers bug for Windows.
5+
- Fix corner case for packet resizing.
6+
17
2023-01-04
28
- 3.3.0
39
- Improve path validation logic to avoid sending padded packet to unverified

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = u'3.3'
2828
# The full version, including alpha/beta/rc tags
29-
release = u'3.3.0'
29+
release = u'3.3.1'
3030

3131

3232
# -- General configuration ---------------------------------------------------

include/lsquic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727

2828
#define LSQUIC_MAJOR_VERSION 3
2929
#define LSQUIC_MINOR_VERSION 3
30-
#define LSQUIC_PATCH_VERSION 0
30+
#define LSQUIC_PATCH_VERSION 1
3131

3232
/**
3333
* Engine flags:

src/liblsquic/lsquic_hpi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ lsquic_hpi_init (void *iter_p, struct lsquic_stream *first,
111111
else
112112
while (1)
113113
{
114+
HPI_DEBUG("add stream %"PRIu64, stream->id);
114115
add_stream_to_hpi(iter, stream);
115116
++count;
116117
if (stream == last)

src/liblsquic/lsquic_packet_resize.c

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,23 @@ packet_resize_next_frec (struct packet_resize_ctx *prctx)
6161
prctx->prc_cur_packet = NULL; /* Not necessary; just future-proofing */
6262
}
6363

64-
prctx->prc_cur_packet = prctx->prc_pri->pri_next_packet(prctx->prc_data);
65-
if (!prctx->prc_cur_packet)
64+
do
6665
{
67-
LSQ_DEBUG("out of input packets");
68-
return NULL;
69-
}
70-
frec = lsquic_pofi_first(&prctx->prc_pofi, prctx->prc_cur_packet);
71-
assert(frec);
66+
prctx->prc_cur_packet = prctx->prc_pri->pri_next_packet(prctx->prc_data);
67+
if (!prctx->prc_cur_packet)
68+
{
69+
LSQ_DEBUG("out of input packets");
70+
return NULL;
71+
}
72+
frec = lsquic_pofi_first(&prctx->prc_pofi, prctx->prc_cur_packet);
73+
if (frec == NULL)
74+
{
75+
LSQ_DEBUG("discard, no good frec from current packet %"PRIu64,
76+
prctx->prc_cur_packet->po_packno);
77+
prctx->prc_pri->pri_discard_packet(prctx->prc_data,
78+
prctx->prc_cur_packet);
79+
}
80+
} while (frec == NULL);
7281
LSQ_DEBUG("return first frec from new current packet %"PRIu64,
7382
prctx->prc_cur_packet->po_packno);
7483
return frec;

src/liblsquic/lsquic_qenc_hdl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ qeh_write_headers (struct qpack_enc_hdl *qeh, lsquic_stream_id_t stream_id,
423423
{
424424
if (headers->headers[i].buf == NULL)
425425
continue;
426-
enc_sz = sizeof(enc_buf);
426+
enc_sz = qeh->qeh_encoder.qpe_cur_max_capacity * 2;
427427
hea_sz = end - p;
428428
st = lsqpack_enc_encode(&qeh->qeh_encoder, enc_buf, &enc_sz, p,
429429
&hea_sz, &headers->headers[i], enc_flags);
@@ -515,6 +515,7 @@ qeh_write_headers (struct qpack_enc_hdl *qeh, lsquic_stream_id_t stream_id,
515515
"%.3f", total_enc_sz, lsquic_frab_list_size(&qeh->qeh_fral),
516516
*headers_sz, lsqpack_enc_ratio(&qeh->qeh_encoder));
517517
retval = QWH_PARTIAL;
518+
lsquic_stream_wantwrite(qeh->qeh_enc_sm_out, 1);
518519
goto end;
519520
}
520521

src/liblsquic/lsquic_send_ctl.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,9 +1643,12 @@ static int
16431643
send_ctl_can_send (struct lsquic_send_ctl *ctl)
16441644
{
16451645
const unsigned n_out = send_ctl_all_bytes_out(ctl);
1646-
LSQ_DEBUG("%s: n_out: %u (unacked_all: %u); cwnd: %"PRIu64, __func__,
1646+
LSQ_DEBUG("%s: n_out: %u (unacked_all: %u); cwnd: %"PRIu64
1647+
"; ccfc: %"PRIu64"/%"PRIu64, __func__,
16471648
n_out, ctl->sc_bytes_unacked_all,
1648-
ctl->sc_ci->cci_get_cwnd(CGP(ctl)));
1649+
ctl->sc_ci->cci_get_cwnd(CGP(ctl)),
1650+
ctl->sc_conn_pub->conn_cap.cc_sent,
1651+
ctl->sc_conn_pub->conn_cap.cc_max);
16491652
if (ctl->sc_flags & SC_PACE)
16501653
{
16511654
if (n_out >= ctl->sc_ci->cci_get_cwnd(CGP(ctl)))

src/liblsquic/lsquic_stream.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ decr_conn_cap (struct lsquic_stream *stream, size_t incr)
583583
{
584584
assert(stream->conn_pub->conn_cap.cc_sent >= incr);
585585
stream->conn_pub->conn_cap.cc_sent -= incr;
586+
LSQ_DEBUG("decrease cc_sent by %zd to %"PRIu64, incr,
587+
stream->conn_pub->conn_cap.cc_sent);
588+
586589
}
587590
}
588591

@@ -2048,8 +2051,11 @@ maybe_put_onto_write_q (lsquic_stream_t *stream, enum stream_q_flags flag)
20482051
{
20492052
assert(SMQF_WRITE_Q_FLAGS & flag);
20502053
if (!(stream->sm_qflags & SMQF_WRITE_Q_FLAGS))
2054+
{
2055+
LSQ_DEBUG("put on write queue");
20512056
TAILQ_INSERT_TAIL(&stream->conn_pub->write_streams, stream,
20522057
next_write_stream);
2058+
}
20532059
stream->sm_qflags |= flag;
20542060
}
20552061

@@ -2402,6 +2408,8 @@ lsquic_stream_dispatch_write_events (lsquic_stream_t *stream)
24022408
unsigned short n_buffered;
24032409
enum stream_q_flags q_flags;
24042410

2411+
LSQ_DEBUG("dispatch_write_events");
2412+
24052413
if (!(stream->sm_qflags & SMQF_WRITE_Q_FLAGS)
24062414
|| (stream->stream_flags & STREAM_FINISHED))
24072415
return;
@@ -2761,6 +2769,8 @@ incr_conn_cap (struct lsquic_stream *stream, size_t incr)
27612769
stream->conn_pub->conn_cap.cc_sent += incr;
27622770
assert(stream->conn_pub->conn_cap.cc_sent
27632771
<= stream->conn_pub->conn_cap.cc_max);
2772+
LSQ_DEBUG("increase cc_sent by %zd to %"PRIu64, incr,
2773+
stream->conn_pub->conn_cap.cc_sent);
27642774
}
27652775
}
27662776

@@ -3976,17 +3986,15 @@ lsquic_stream_pwritev (struct lsquic_stream *stream,
39763986
bits = p[1] >> 6;
39773987
vint_write(p + 1, payload_sz - shortfall, bits, 1 << bits);
39783988
decr = shortfall;
3979-
if (stream->sm_bflags & SMBF_CONN_LIMITED)
3980-
stream->conn_pub->conn_cap.cc_sent -= decr;
3989+
decr_conn_cap(stream, decr);
39813990
stream->sm_payload -= decr;
39823991
stream->tosend_off -= decr;
39833992
shortfall = 0;
39843993
}
39853994
else
39863995
{
39873996
decr = payload_sz + 2 + (p[1] >> 6);
3988-
if (stream->sm_bflags & SMBF_CONN_LIMITED)
3989-
stream->conn_pub->conn_cap.cc_sent -= decr;
3997+
decr_conn_cap(stream, decr);
39903998
stream->sm_payload -= payload_sz;
39913999
stream->tosend_off -= decr;
39924000
shortfall -= payload_sz;
@@ -3998,8 +4006,7 @@ lsquic_stream_pwritev (struct lsquic_stream *stream,
39984006
else
39994007
{
40004008
const size_t shortfall = n_allocated - (size_t) nw;
4001-
if (stream->sm_bflags & SMBF_CONN_LIMITED)
4002-
stream->conn_pub->conn_cap.cc_sent -= shortfall;
4009+
decr_conn_cap(stream, shortfall);
40034010
stream->sm_payload -= shortfall;
40044011
stream->tosend_off -= shortfall;
40054012
}

0 commit comments

Comments
 (0)