litespeed-quic/CHANGELOG

532 lines
19 KiB
Plaintext
Raw Normal View History

2019-01-10
- 1.17.12
- [FEATURE] http_client can now issue parallel requests in the context
of a single connection. See -w option.
2019-01-03
- 1.17.11
- Fix strict aliasing warning in optimized compilation.
2018-12-27
- 1.17.10
- Fix the example program to be able to use parallel connections
again. (See the -n argument.)
2018-12-18
- 1.17.9
- [BUGFIX] Engine: reduce minimum batch size from 256 to 4
2018-12-10
- 1.17.8
- [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux
2018-12-03
- 1.17.7
- [BUGFIX] Do not unset PING alarm before ringing expired alarms.
This prevented PING from ever being sent.
2018-11-29
- 1.17.6
- Add failsafe: resume sending packets after some time
The change puts a 1-second limit on the amount of time the engine
will not send packets after some packets are delayed. This makes
the library robust in case the user does not unblock the engine
explicitly using lsquic_engine_send_unsent_packets() call.
- [BUGFIX] Handle corner cases in send controller when packets are
a) delayed or b) dropped during repackaging.
- [BUGFIX] Memory leak: destroy buffered packets during controller
cleanup.
2018-11-16
- 1.17.3
- [BUGFIX] Do not send STOP_WAITING frames when using Q044
2018-10-19
- 1.17.2
- [BUGFIX] Memory leak in test_frame_rw unit test.
- [BUGFIX] Parsing packets with short IETF header: do not overwrite
flags. (Only a problem in unit tests -- benign otherwise.)
2018-10-16
- 1.17.0
- [API Change] Packet out Memory Interface (PMI) update:
- Split PMI pool return into pmi_release and pmi_return
- PMI callbacks take peer_ctx and is_ipv6 arguments
- [BUGFIX] Fix use-after-free when certificate is updated
- Silence gcc warning in optimized mode by performing useless
initialization
- cmake: use the standard variable CMAKE_BUILD_TYPE instead of
DEVEL_MODE
2018-10-03
- 1.16.0
- [API Change] Add lsquic_conn_n_avail_streams()
- [BUGFIX] only dispatch crypto stream read events if WANT_READ is on
2018-09-27
- 1.15.0
- [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses
- [BUGFIX] free uncompressed headers correctly when error occurs
2018-09-12
- 1.14.3
- [BUGFIX] Do not abort conn on STREAM frame for a reset stream
- [BUGFIX] Drop packets that would become empty due to repackaging.
Packets on the scheduled queue may be marked for repackaging.
Frames such as ACK frame that are never resent are removed from
repackaged packets. We must check that the newly repackaged packet
would not be empty. If it would be, it is destroyed instead and
the next packet on the scheduled queue is used. Note that this
change only affects the logic to return the next packet to be sent.
Lost packets that are being rescheduled are already processed in
this fashion.
- Byteswap CID before logging it - this makes it match Chrome CIDs.
(Except Q035, which is the last little-endian GQUIC version we
support.)
2018-09-06
- 1.14.0
- [API Change] Disable packet sending if full batch cannot be sent
If lsquic_packets_out_f() cannot send the whole batch, disable
packet sending until lsquic_engine_send_unsent_packets() is called.
- [BUGFIX] Handle case when STREAM frame does not fit.
- [BUGFIX] Always allow incoming STREAM frames to overlap. Peers
may send overlapping STREAM frames even if using versions older
than Q043.
- Custom header set fixes:
- set "FIN reached" flag when custom header with FIN flag is
claimed;
- do not return custom header set for a reset stream.
2018-08-27
- 1.13.0
- [FEATURE, API Change] Add ability to create custom header set
objects via callbacks. This avoids reading and re-parsing
headers from the stream.
2018-08-27
- 1.12.4
- Fix memory leak when engine is destroyed
- Fix memory leak in http_client
- Fix gcc warning in unit tests
2018-08-22
- 1.12.3
- [BUGFIX] Fix duplicate STREAM frame detection
2018-08-20
- 1.12.2
- [BUGFIX] Update count of scheduled bytes when adjusting size of
an already-scheduled packet.
- Emit info instead of warning messages when stream is used in
unexpected ways.
2018-08-17
- 1.12.0
- [FEATURE, API Change] Add support for certificate verification
2018-08-16
- 1.11.1
- [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code
2018-08-15 19:06:31 +00:00
2018-08-15
- 1.11.0
- [FEATURE] Add support for Q044.
2018-08-09
- 1.10.2
- [BUGFIX] Don't go over limit when creating delayed streams
2018-07-10
- 1.10.1
- [BUGFIX] process connections after each batch of packets is read
This avoids a problem of accumulating a very large list of packets
(possible when speeds are high and socket's receive buffer is large)
and processing it all at once.
- If glibc is older than 2.17, link with rt. This is necessary for
clock_getres(2).
- Add version macros to lsquic.h; remove unnecessary includes.
2018-06-13
- [BUGFIX] allow multiple parallel connections by default
Use the original method of tracking connections by CIDs by default.
If zero-sized CID support is turned on, connections are tracked by
the address. A new connection is not created if another connection
is using the same network address
2018-05-30
- [FEATURE, API CHANGE] Support zero-sized CIDs in received packets
2018-05-24
- Close connection properly when packet encryption fails
2018-05-23
- [BUGFIX] Do not produce packet sequence gaps due to delayed packets
2018-05-21
- [API Change] Add optional callback to call when handshake is done
- [API Change, BUGFIX] After send failure, wait until transport available
2018-05-18
- [API] Expose useful lsquic_ver2str[] in lsquic.h
- [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision
- Improve checks of number of incoming streams limit and associated
error reporting.
- [BUGFIX] Command-line option `-6` now works correctly.
2018-05-16
- [FEATURE] DNS resolution
- [BUGFIX] Frame insertion mis-ID as overlap instead of dup
- http_client: fix priority range generated by -E flag
2018-05-09 12:57:43 +00:00
2018-05-09
- [FEATURE] Add support for Q043.
2018-05-09 18:43:22 +00:00
- Support for versions Q037, Q038, Q041, and Q042 has been removed.
2018-05-09 12:57:43 +00:00
- Fix typo in debug message.
- Fix code indentation.
- Add /* fallthru */ comment to stop newer gcc from complaining.
- Logger: fix compilation of optimized Windows build.
2018-05-04
2018-05-04 18:00:34 +00:00
- [FEATURE] Add support for Q042.
- Remove comment: MSPC is obsolete (no code changes)
- Prog: use lsquic_str2ver() when processing -o version flag
- Remove unused CTIM and SRBF transport parameters
- Disable QUIC versions Q037 and Q038 by default
- Fix Windows compilation by including compat header file in
lshpack.c
- Address warnings produced by newer versions of gcc
- Future-proof: turn off -Werror
2018-05-02
- [BUGFIX] Make lsquic_conn_quic_version() available
- Switch to using ls-hpack 1.1
- [BUGFIX] Do not ignore stream resets after receiving FIN
2018-04-27
- HPACK: do not allow header block to end with table size update.
2018-04-25
- [BUGFIX] Do not create gap in sent packnos when squeezing delayed
packets.
- [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes.
- [BUGFIX] connections with blocked scheduled packets are not tickable
for sending.
- [BUGFIX] Conn is tickable if it wants to send a connection-level
frame.
2018-04-23
- Fix busy loop: tickable must make progress. When connection is
self-reporting as tickable, it must make progress when ticked. There
are two issues:
1. If there are buffered packets, the connection is only tickable if
they can be sent out.
2. A connection is tickable if there are streams on the servicing
queue. When the tick occurs, we must service the stream
independent of whether any packets are sent.
- Fix assertion in pacer which can be incorrect under some
conditions.
- cmake: do not turn on address sanitizer if in Travis.
2018-04-20
- [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's
changes.
2018-04-19
- [BUGFIX] Add connection to Tickable Queue on stream write
- cmake: use MSVC variable instead of trying to detect
- engine: improve connection incref/decref logging
- stream: don't ignore errors that may occur on triggered flush
- connection: remove obsolete method
- engine: indicate connection as tickable if previous call went
over threshold
[API Change, OPTIMIZATION] Only process conns that need to be processed The API is simplified: do not expose the user code to several queues. A "connection queue" is now an internal concept. The user processes connections using the single function lsquic_engine_process_conns(). When this function is called, only those connections are processed that need to be processed. A connection needs to be processed when: 1. New incoming packets have been fed to the connection. 2. User wants to read from a stream that is readable. 3. User wants to write to a stream that is writeable. 4. There are buffered packets that can be sent out. (This means that the user wrote to a stream outside of the lsquic library callback.) 5. A control frame (such as BLOCKED) needs to be sent out. 6. A stream needs to be serviced or delayed stream needs to be created. 7. An alarm rings. 8. Pacer timer expires. To achieve this, the library places the connections into two priority queues (min heaps): 1. Tickable Queue; and 2. Advisory Tick Time queue (ATTQ). Each time lsquic_engine_process_conns() is called, the Tickable Queue is emptied. After the connections have been ticked, they are queried again: if a connection is not being closed, it is placed either in the Tickable Queue if it is ready to be ticked again or it is placed in the Advisory Tick Time Queue. It is assumed that a connection always has at least one timer set (the idle alarm). The connections in the Tickable Queue are arranged in the least recently ticked order. This lets connections that have been quiet longer to get their packets scheduled first. This change means that the library no longer needs to be ticked periodically. The user code can query the library when is the next tick event and schedule it exactly. When connections are processed, only the tickable connections are processed, not *all* the connections. When there are no tick events, it means that no timer event is necessary -- only the file descriptor READ event is active. The following are improvements and simplifications that have been triggered: - Queue of connections with incoming packets is gone. - "Pending Read/Write Events" Queue is gone (along with its history and progress checks). This queue has become the Tickable Queue. - The connection hash no longer needs to track the connection insertion order.
2018-04-09 13:39:38 +00:00
2018-04-09
[API Change, OPTIMIZATION] Only process conns that need to be processed
The API is simplified: do not expose the user code to several
queues. A "connection queue" is now an internal concept.
The user processes connections using the single function
lsquic_engine_process_conns(). When this function is called,
only those connections are processed that need to be processed.
A connection needs to be processed when:
1. New incoming packets have been fed to the connection.
2. User wants to read from a stream that is readable.
3. User wants to write to a stream that is writeable.
4. There are buffered packets that can be sent out. (This
means that the user wrote to a stream outside of the
lsquic library callback.)
5. A control frame (such as BLOCKED) needs to be sent out.
6. A stream needs to be serviced or delayed stream needs to
be created.
7. An alarm rings.
8. Pacer timer expires.
To achieve this, the library places the connections into two
priority queues (min heaps):
1. Tickable Queue; and
2. Advisory Tick Time queue (ATTQ).
Each time lsquic_engine_process_conns() is called, the Tickable
Queue is emptied. After the connections have been ticked, they are
queried again: if a connection is not being closed, it is placed
either in the Tickable Queue if it is ready to be ticked again or
it is placed in the Advisory Tick Time Queue. It is assumed that
a connection always has at least one timer set (the idle alarm).
The connections in the Tickable Queue are arranged in the least
recently ticked order. This lets connections that have been quiet
longer to get their packets scheduled first.
This change means that the library no longer needs to be ticked
periodically. The user code can query the library when is the
next tick event and schedule it exactly. When connections are
processed, only the tickable connections are processed, not *all*
the connections. When there are no tick events, it means that no
timer event is necessary -- only the file descriptor READ event
is active.
The following are improvements and simplifications that have
been triggered:
- Queue of connections with incoming packets is gone.
- "Pending Read/Write Events" Queue is gone (along with its
history and progress checks). This queue has become the
Tickable Queue.
- The connection hash no longer needs to track the connection
insertion order.
2018-04-02 19:16:01 +00:00
2018-04-02
- [FEATURE] Windows support
- Reduce stack use -- outgoing packet batch is now allocated on the heap.
Latest changes - [OPTIMIZATION] Merge series of ACKs if possible Parsed single-range ACK frames (that is the majority of frames) are saved in the connection and their processing is deferred until the connection is ticked. If several ACKs come in a series between adjacent ticks, we check whether the latest ACK is a strict superset of the saved ACK. If it is, the older ACK is not processed. If ACK frames can be merged, they are merged and only one of them is either processed or saved. - [OPTIMIZATION] Speed up ACK verification by simplifying send history. Never generate a gap in the sent packet number sequence. This reduces the send history to a single number instead of potentially a series of packet ranges and thereby speeds up ACK verification. By default, detecting a gap in the send history is not fatal: only a single warning is generated per connection. The connection can continue to operate even if the ACK verification code is not able to detect some inconsistencies. - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct The first part of struct lsquic_send_ctl now consists of members that are used in lsquic_send_ctl_got_ack() (in the absense of packet loss, which is the normal case). To speed up reads and writes, we no longer try to save space by using 8- and 16-bit integers. Use regular integer width for everything. - [OPTIMIZATION] Cache size of sent packet. - [OPTIMIZATION] Keep track of the largest ACKed in packet_out Instead of parsing our own ACK frames when packet has been acked, use the value saved in the packet_out structure when the ACK frame was generated. - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed - [OPTIMIZATION] Several code-level optimizations to ACK processing. - Fix: http_client: fix -I flag; switch assert() to abort()
2018-03-09 19:17:39 +00:00
2018-03-09
- [OPTIMIZATION] Merge series of ACKs if possible
Parsed single-range ACK frames (that is the majority of frames) are
saved in the connection and their processing is deferred until the
connection is ticked. If several ACKs come in a series between
adjacent ticks, we check whether the latest ACK is a strict superset
of the saved ACK. If it is, the older ACK is not processed.
If ACK frames can be merged, they are merged and only one of them is
either processed or saved.
- [OPTIMIZATION] Speed up ACK verification by simplifying send history.
Never generate a gap in the sent packet number sequence. This reduces
the send history to a single number instead of potentially a series of
packet ranges and thereby speeds up ACK verification.
By default, detecting a gap in the send history is not fatal: only a
single warning is generated per connection. The connection can continue
to operate even if the ACK verification code is not able to detect some
inconsistencies.
- [OPTIMIZATION] Rearrange the lsquic_send_ctl struct
The first part of struct lsquic_send_ctl now consists of members that
are used in lsquic_send_ctl_got_ack() (in the absense of packet loss,
which is the normal case). To speed up reads and writes, we no longer
try to save space by using 8- and 16-bit integers. Use regular integer
width for everything.
- [OPTIMIZATION] Cache size of sent packet.
- [OPTIMIZATION] Keep track of the largest ACKed in packet_out
Instead of parsing our own ACK frames when packet has been acked,
use the value saved in the packet_out structure when the ACK frame
was generated.
- [OPTIMIZATION] Take RTT sampling conditional out of ACK loop
- [OPTIMIZATION] ACK processing: only call clock_gettime() if needed
- [OPTIMIZATION] Several code-level optimizations to ACK processing.
- Fix: http_client: fix -I flag; switch assert() to abort()
Latest changes - [API Change] lsquic_engine_connect() returns pointer to the connection object. - [API Change] Add lsquic_conn_get_engine() to get engine object from connection object. - [API Change] Add lsquic_conn_status() to query connection status. - [API Change] Add add lsquic_conn_set_ctx(). - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345 - [OPTIMIZATION] Process handshake STREAM frames as soon as packet arrives. - [OPTIMIZATION] Do not compile expensive send controller sanity check by default. - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header. - [OPTIMIZATION] Only make squeeze function call if necessary. - [OPTIMIZATION] Speed up Q039 ACK frame parsing. - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes. - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating. - [OPTIMIZATION] Prefetch next unacked packet when processing ACK. - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are. ordered. - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation - Fix: reset incoming streams that arrive after we send GOAWAY. - Fix: delay client on_new_conn() call until connection is fully set up. - Fixes to buffered packets logic: splitting, STREAM frame elision. - Fix: do not dispatch on_write callback if no packets are available. - Fix WINDOW_UPDATE send and resend logic. - Fix STREAM frame extension code. - Fix: Drop unflushed data when stream is reset. - Switch to tracking CWND using bytes rather than packets. - Fix TCP friendly adjustment in cubic. - Fix: do not generate invalid STOP_WAITING frames during high packet loss. - Pacer fixes.
2018-02-26 21:01:16 +00:00
2018-02-26
- [API Change] lsquic_engine_connect() returns pointer to the connection
object.
- [API Change] Add lsquic_conn_get_engine() to get engine object from
connection object.
- [API Change] Add lsquic_conn_status() to query connection status.
- [API Change] Add add lsquic_conn_set_ctx().
- [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345
- [OPTIMIZATION] Process handshake STREAM frames as soon as packet
arrives.
- [OPTIMIZATION] Do not compile expensive send controller sanity check
by default.
- [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header.
- [OPTIMIZATION] Only make squeeze function call if necessary.
- [OPTIMIZATION] Speed up Q039 ACK frame parsing.
- [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes.
- [OPTIMIZATION] Keep track of scheduled bytes instead of calculating.
- [OPTIMIZATION] Prefetch next unacked packet when processing ACK.
- [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are.
ordered.
- [OPTIMIZATION] Reduce function pointer use for STREAM frame generation
- Fix: reset incoming streams that arrive after we send GOAWAY.
- Fix: delay client on_new_conn() call until connection is fully set up.
- Fixes to buffered packets logic: splitting, STREAM frame elision.
- Fix: do not dispatch on_write callback if no packets are available.
- Fix WINDOW_UPDATE send and resend logic.
- Fix STREAM frame extension code.
- Fix: Drop unflushed data when stream is reset.
- Switch to tracking CWND using bytes rather than packets.
- Fix TCP friendly adjustment in cubic.
- Fix: do not generate invalid STOP_WAITING frames during high packet
loss.
- Pacer fixes.
2017-12-18
- Fix: better follow cubic curve after idle period
- Fix: add missing parts to outgoing packet splitting code
- Fix: compilation using gcc 4.8.4
2017-10-31
- Add APIs.txt -- describes LSQUIC APIs
Latest changes - [API Change] Sendfile-like functionality is gone. The stream no longer opens files and deals with file descriptors. (Among other things, this makes the code more portable.) Three writing functions are provided: lsquic_stream_write lsquic_stream_writev lsquic_stream_writef (NEW) lsquic_stream_writef() is given an abstract reader that has function pointers for size() and read() functions which the user can implement. This is the most flexible way. lsquic_stream_write() and lsquic_stream_writev() are now both implemented as wrappers around lsquic_stream_writef(). - [OPTIMIZATION] When writing to stream, be it within or without the on_write() callback, place data directly into packet buffer, bypassing auxiliary data structures. This reduces amount of memory required, for the amount of data that can be written is limited by the congestion window. To support writes outside the on_write() callback, we keep N outgoing packet buffers per connection which can be written to by any stream. One half of these are reserved for the highest priority stream(s), the other half for all other streams. This way, low-priority streams cannot write instead of high-priority streams and, on the other hand, low-priority streams get a chance to send their packets out. The algorithm is as follows: - When user writes to stream outside of the callback: - If this is the highest priority stream, place it onto the reserved N/2 queue or fail. (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- rather than N/2, allowing high-priority streams to write as much as can be sent.) - If the stream is not the highest priority, try to place the data onto the reserved N/2 queue or fail. - When tick occurs *and* more packets can be scheduled: - Transfer packets from the high N/2 queue to the scheduled queue. - If more scheduling is allowed: - Call on_write callbacks for highest-priority streams, placing resulting packets directly onto the scheduled queue. - If more scheduling is allowed: - Transfer packets from the low N/2 queue to the scheduled queue. - If more scheduling is allowed: - Call on_write callbacks for non-highest-priority streams, placing resulting packets directly onto the scheduled queue The number N is currently 20, but it could be varied based on resource usage. - If stream is created due to incoming headers, make headers readable from on_new. - Outgoing packets are no longer marked non-writeable to prevent placing more than one STREAM frame from the same stream into a single packet. This property is maintained via code flow and an explicit check. Packets for stream data are allocated using a special function. - STREAM frame elision is cheaper, as we only perform it if a reset stream has outgoing packets referencing it. - lsquic_packet_out_t is smaller, as stream_rec elements are now inside a union.
2017-10-31 13:35:58 +00:00
2017-10-31
- [API Change] Sendfile-like functionality is gone. The stream no
longer opens files and deals with file descriptors. (Among other
things, this makes the code more portable.) Three writing functions
are provided:
lsquic_stream_write
lsquic_stream_writev
lsquic_stream_writef (NEW)
lsquic_stream_writef() is given an abstract reader that has function
pointers for size() and read() functions which the user can implement.
This is the most flexible way. lsquic_stream_write() and
lsquic_stream_writev() are now both implemented as wrappers around
lsquic_stream_writef().
- [OPTIMIZATION] When writing to stream, be it within or without the
on_write() callback, place data directly into packet buffer,
bypassing auxiliary data structures. This reduces amount of memory
required, for the amount of data that can be written is limited
by the congestion window.
To support writes outside the on_write() callback, we keep N
outgoing packet buffers per connection which can be written to
by any stream. One half of these are reserved for the highest
priority stream(s), the other half for all other streams. This way,
low-priority streams cannot write instead of high-priority streams
and, on the other hand, low-priority streams get a chance to send
their packets out.
The algorithm is as follows:
- When user writes to stream outside of the callback:
- If this is the highest priority stream, place it onto the
reserved N/2 queue or fail.
(The actual size of this queue is dynamic -- MAX(N/2, CWND) --
rather than N/2, allowing high-priority streams to write as
much as can be sent.)
- If the stream is not the highest priority, try to place the
data onto the reserved N/2 queue or fail.
- When tick occurs *and* more packets can be scheduled:
- Transfer packets from the high N/2 queue to the scheduled
queue.
- If more scheduling is allowed:
- Call on_write callbacks for highest-priority streams,
placing resulting packets directly onto the scheduled queue.
- If more scheduling is allowed:
- Transfer packets from the low N/2 queue to the scheduled
queue.
- If more scheduling is allowed:
- Call on_write callbacks for non-highest-priority streams,
placing resulting packets directly onto the scheduled queue
The number N is currently 20, but it could be varied based on
resource usage.
- If stream is created due to incoming headers, make headers readable
from on_new.
- Outgoing packets are no longer marked non-writeable to prevent placing
more than one STREAM frame from the same stream into a single packet.
This property is maintained via code flow and an explicit check.
Packets for stream data are allocated using a special function.
- STREAM frame elision is cheaper, as we only perform it if a reset
stream has outgoing packets referencing it.
- lsquic_packet_out_t is smaller, as stream_rec elements are now
inside a union.
2017-10-12
- Do not send RST_STREAM when stream is closed for reading
- Raise maximum header size from 4K to 64K
- Check header name and value lengths against maximum imposed by HPACK
- Fix NULL dereference in stream flow controller
2017-10-09
- Hide handshake implementation behind a set of function pointers
- Use monotonically increasing clock
- Make sure that retx delay is not larger than the max of 60 seconds
2017-09-29
- A few fixes to code and README
2017-09-28
- Add support for Q041; drop support for Q040
2017-09-27
- Fix CMakeLists.txt: BoringSSL include and lib was mixed up
2017-09-26
- Add support for Mac OS
- Add support for Raspberry Pi
- Fix BoringSSL compilation: include <openssl/hmac.h> explicitly
2017-09-22
- Initial release