CHANGELOG revision 2815666c
12019-01-10
2    - 1.17.12
3    - [FEATURE] http_client can now issue parallel requests in the context
4      of a single connection.  See -w option.
5
62019-01-03
7    - 1.17.11
8    - Fix strict aliasing warning in optimized compilation.
9
102018-12-27
11    - 1.17.10
12    - Fix the example program to be able to use parallel connections
13      again.  (See the -n argument.)
14
152018-12-18
16    - 1.17.9
17    - [BUGFIX] Engine: reduce minimum batch size from 256 to 4
18
192018-12-10
20    - 1.17.8
21    - [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux
22
232018-12-03
24    - 1.17.7
25    - [BUGFIX] Do not unset PING alarm before ringing expired alarms.
26      This prevented PING from ever being sent.
27
282018-11-29
29    - 1.17.6
30    - Add failsafe: resume sending packets after some time
31
32      The change puts a 1-second limit on the amount of time the engine
33      will not send packets after some packets are delayed.  This makes
34      the library robust in case the user does not unblock the engine
35      explicitly using lsquic_engine_send_unsent_packets() call.
36
37    - [BUGFIX] Handle corner cases in send controller when packets are
38      a) delayed or b) dropped during repackaging.
39    - [BUGFIX] Memory leak: destroy buffered packets during controller
40      cleanup.
41
422018-11-16
43    - 1.17.3
44    - [BUGFIX] Do not send STOP_WAITING frames when using Q044
45
462018-10-19
47    - 1.17.2
48    - [BUGFIX] Memory leak in test_frame_rw unit test.
49    - [BUGFIX] Parsing packets with short IETF header: do not overwrite
50      flags.  (Only a problem in unit tests -- benign otherwise.)
51
522018-10-16
53    - 1.17.0
54    - [API Change] Packet out Memory Interface (PMI) update:
55      - Split PMI pool return into pmi_release and pmi_return
56      - PMI callbacks take peer_ctx and is_ipv6 arguments
57    - [BUGFIX] Fix use-after-free when certificate is updated
58    - Silence gcc warning in optimized mode by performing useless
59      initialization
60    - cmake: use the standard variable CMAKE_BUILD_TYPE instead of
61      DEVEL_MODE
62
632018-10-03
64    - 1.16.0
65    - [API Change] Add lsquic_conn_n_avail_streams()
66    - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on
67
682018-09-27
69    - 1.15.0
70    - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses
71    - [BUGFIX] free uncompressed headers correctly when error occurs
72
732018-09-12
74    - 1.14.3
75    - [BUGFIX] Do not abort conn on STREAM frame for a reset stream
76    - [BUGFIX] Drop packets that would become empty due to repackaging.
77      Packets on the scheduled queue may be marked for repackaging.
78      Frames such as ACK frame that are never resent are removed from
79      repackaged packets.  We must check that the newly repackaged packet
80      would not be empty.  If it would be, it is destroyed instead and
81      the next packet on the scheduled queue is used.  Note that this
82      change only affects the logic to return the next packet to be sent.
83      Lost packets that are being rescheduled are already processed in
84      this fashion.
85    - Byteswap CID before logging it - this makes it match Chrome CIDs.
86      (Except Q035, which is the last little-endian GQUIC version we
87      support.)
88
892018-09-06
90    - 1.14.0
91    - [API Change] Disable packet sending if full batch cannot be sent
92      If lsquic_packets_out_f() cannot send the whole batch, disable
93      packet sending until lsquic_engine_send_unsent_packets() is called.
94    - [BUGFIX] Handle case when STREAM frame does not fit.
95    - [BUGFIX] Always allow incoming STREAM frames to overlap.  Peers
96      may send overlapping STREAM frames even if using versions older
97      than Q043.
98    - Custom header set fixes:
99      - set "FIN reached" flag when custom header with FIN flag is
100        claimed;
101      - do not return custom header set for a reset stream.
102
1032018-08-27
104
105    - 1.13.0
106    - [FEATURE, API Change] Add ability to create custom header set
107      objects via callbacks.  This avoids reading and re-parsing
108      headers from the stream.
109
1102018-08-27
111
112    - 1.12.4
113    - Fix memory leak when engine is destroyed
114    - Fix memory leak in http_client
115    - Fix gcc warning in unit tests
116
1172018-08-22
118
119    - 1.12.3
120    - [BUGFIX] Fix duplicate STREAM frame detection
121
1222018-08-20
123
124    - 1.12.2
125    - [BUGFIX] Update count of scheduled bytes when adjusting size of
126      an already-scheduled packet.
127    - Emit info instead of warning messages when stream is used in
128      unexpected ways.
129
1302018-08-17
131
132    - 1.12.0
133    - [FEATURE, API Change] Add support for certificate verification
134
1352018-08-16
136
137    - 1.11.1
138    - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code
139
1402018-08-15
141
142    - 1.11.0
143    - [FEATURE] Add support for Q044.
144
1452018-08-09
146
147    - 1.10.2
148    - [BUGFIX] Don't go over limit when creating delayed streams
149
1502018-07-10
151
152    - 1.10.1
153    - [BUGFIX]  process connections after each batch of packets is read
154      This avoids a problem of accumulating a very large list of packets
155      (possible when speeds are high and socket's receive buffer is large)
156      and processing it all at once.
157    - If glibc is older than 2.17, link with rt.  This is necessary for
158      clock_getres(2).
159    - Add version macros to lsquic.h; remove unnecessary includes.
160
1612018-06-13
162
163    - [BUGFIX] allow multiple parallel connections by default
164
165      Use the original method of tracking connections by CIDs by default.
166      If zero-sized CID support is turned on, connections are tracked by
167      the address.  A new connection is not created if another connection
168      is using the same network address
169
1702018-05-30
171
172    - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets
173
1742018-05-24
175
176    - Close connection properly when packet encryption fails
177
1782018-05-23
179
180    - [BUGFIX] Do not produce packet sequence gaps due to delayed packets
181
1822018-05-21
183
184    - [API Change] Add optional callback to call when handshake is done
185    - [API Change, BUGFIX] After send failure, wait until transport available
186
1872018-05-18
188
189    - [API] Expose useful lsquic_ver2str[] in lsquic.h
190    - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision
191    - Improve checks of number of incoming streams limit and associated
192      error reporting.
193    - [BUGFIX] Command-line option `-6` now works correctly.
194
1952018-05-16
196
197    - [FEATURE] DNS resolution
198    - [BUGFIX] Frame insertion mis-ID as overlap instead of dup
199    - http_client: fix priority range generated by -E flag
200
2012018-05-09
202
203    - [FEATURE] Add support for Q043.
204    - Support for versions Q037, Q038, Q041, and Q042 has been removed.
205    - Fix typo in debug message.
206    - Fix code indentation.
207    - Add /* fallthru */ comment to stop newer gcc from complaining.
208    - Logger: fix compilation of optimized Windows build.
209
2102018-05-04
211
212    - [FEATURE] Add support for Q042.
213    - Remove comment: MSPC is obsolete (no code changes)
214    - Prog: use lsquic_str2ver() when processing -o version flag
215    - Remove unused CTIM and SRBF transport parameters
216    - Disable QUIC versions Q037 and Q038 by default
217    - Fix Windows compilation by including compat header file in
218      lshpack.c
219    - Address warnings produced by newer versions of gcc
220    - Future-proof: turn off -Werror
221
2222018-05-02
223
224    - [BUGFIX] Make lsquic_conn_quic_version() available
225    - Switch to using ls-hpack 1.1
226    - [BUGFIX] Do not ignore stream resets after receiving FIN
227
2282018-04-27
229
230    - HPACK: do not allow header block to end with table size update.
231
2322018-04-25
233
234    - [BUGFIX] Do not create gap in sent packnos when squeezing delayed
235      packets.
236    - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes.
237    - [BUGFIX] connections with blocked scheduled packets are not tickable
238      for sending.
239    - [BUGFIX] Conn is tickable if it wants to send a connection-level
240      frame.
241
2422018-04-23
243
244    - Fix busy loop: tickable must make progress.  When connection is
245      self-reporting as tickable, it must make progress when ticked.  There
246      are two issues:
247        1. If there are buffered packets, the connection is only tickable if
248           they can be sent out.
249        2. A connection is tickable if there are streams on the servicing
250           queue.  When the tick occurs, we must service the stream
251           independent of whether any packets are sent.
252    - Fix assertion in pacer which can be incorrect under some
253      conditions.
254    - cmake: do not turn on address sanitizer if in Travis.
255
2562018-04-20
257
258    - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's
259      changes.
260
2612018-04-19
262
263    - [BUGFIX] Add connection to Tickable Queue on stream write
264    - cmake: use MSVC variable instead of trying to detect
265    - engine: improve connection incref/decref logging
266    - stream: don't ignore errors that may occur on triggered flush
267    - connection: remove obsolete method
268    - engine: indicate connection as tickable if previous call went
269      over threshold
270
2712018-04-09
272
273    [API Change, OPTIMIZATION] Only process conns that need to be processed
274
275    The API is simplified: do not expose the user code to several
276    queues.  A "connection queue" is now an internal concept.
277    The user processes connections using the single function
278    lsquic_engine_process_conns().  When this function is called,
279    only those connections are processed that need to be processed.
280    A connection needs to be processed when:
281
282        1. New incoming packets have been fed to the connection.
283        2. User wants to read from a stream that is readable.
284        3. User wants to write to a stream that is writeable.
285        4. There are buffered packets that can be sent out.  (This
286           means that the user wrote to a stream outside of the
287           lsquic library callback.)
288        5. A control frame (such as BLOCKED) needs to be sent out.
289        6. A stream needs to be serviced or delayed stream needs to
290           be created.
291        7. An alarm rings.
292        8. Pacer timer expires.
293
294    To achieve this, the library places the connections into two
295    priority queues (min heaps):
296
297        1. Tickable Queue; and
298        2. Advisory Tick Time queue (ATTQ).
299
300    Each time lsquic_engine_process_conns() is called, the Tickable
301    Queue is emptied.  After the connections have been ticked, they are
302    queried again: if a connection is not being closed, it is placed
303    either in the Tickable Queue if it is ready to be ticked again or
304    it is placed in the Advisory Tick Time Queue.  It is assumed that
305    a connection always has at least one timer set (the idle alarm).
306
307    The connections in the Tickable Queue are arranged in the least
308    recently ticked order.  This lets connections that have been quiet
309    longer to get their packets scheduled first.
310
311    This change means that the library no longer needs to be ticked
312    periodically.  The user code can query the library when is the
313    next tick event and schedule it exactly.  When connections are
314    processed, only the tickable connections are processed, not *all*
315    the connections.  When there are no tick events, it means that no
316    timer event is necessary -- only the file descriptor READ event
317    is active.
318
319    The following are improvements and simplifications that have
320    been triggered:
321
322        - Queue of connections with incoming packets is gone.
323        - "Pending Read/Write Events" Queue is gone (along with its
324          history and progress checks).  This queue has become the
325          Tickable Queue.
326        - The connection hash no longer needs to track the connection
327          insertion order.
328
3292018-04-02
330
331    - [FEATURE] Windows support
332
333    - Reduce stack use -- outgoing packet batch is now allocated on the heap.
334
3352018-03-09
336
337    - [OPTIMIZATION] Merge series of ACKs if possible
338
339      Parsed single-range ACK frames (that is the majority of frames) are
340      saved in the connection and their processing is deferred until the
341      connection is ticked.  If several ACKs come in a series between
342      adjacent ticks, we check whether the latest ACK is a strict superset
343      of the saved ACK.  If it is, the older ACK is not processed.
344
345      If ACK frames can be merged, they are merged and only one of them is
346      either processed or saved.
347
348    - [OPTIMIZATION] Speed up ACK verification by simplifying send history.
349
350      Never generate a gap in the sent packet number sequence.  This reduces
351      the send history to a single number instead of potentially a series of
352      packet ranges and thereby speeds up ACK verification.
353
354      By default, detecting a gap in the send history is not fatal: only a
355      single warning is generated per connection.  The connection can continue
356      to operate even if the ACK verification code is not able to detect some
357      inconsistencies.
358
359    - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct
360
361      The first part of struct lsquic_send_ctl now consists of members that
362      are used in lsquic_send_ctl_got_ack() (in the absense of packet loss,
363      which is the normal case).  To speed up reads and writes, we no longer
364      try to save space by using 8- and 16-bit integers.  Use regular integer
365      width for everything.
366
367    - [OPTIMIZATION] Cache size of sent packet.
368
369    - [OPTIMIZATION] Keep track of the largest ACKed in packet_out
370
371      Instead of parsing our own ACK frames when packet has been acked,
372      use the value saved in the packet_out structure when the ACK frame
373      was generated.
374
375    - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop
376
377    - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed
378
379    - [OPTIMIZATION] Several code-level optimizations to ACK processing.
380
381    - Fix: http_client: fix -I flag; switch assert() to abort()
382
3832018-02-26
384    - [API Change] lsquic_engine_connect() returns pointer to the connection
385      object.
386    - [API Change] Add lsquic_conn_get_engine() to get engine object from
387      connection object.
388    - [API Change] Add lsquic_conn_status() to query connection status.
389    - [API Change] Add add lsquic_conn_set_ctx().
390    - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345
391    - [OPTIMIZATION] Process handshake STREAM frames as soon as packet
392      arrives.
393    - [OPTIMIZATION] Do not compile expensive send controller sanity check
394      by default.
395    - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header.
396    - [OPTIMIZATION] Only make squeeze function call if necessary.
397    - [OPTIMIZATION] Speed up Q039 ACK frame parsing.
398    - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes.
399    - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating.
400    - [OPTIMIZATION] Prefetch next unacked packet when processing ACK.
401    - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are.
402      ordered.
403    - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation
404    - Fix: reset incoming streams that arrive after we send GOAWAY.
405    - Fix: delay client on_new_conn() call until connection is fully set up.
406    - Fixes to buffered packets logic: splitting, STREAM frame elision.
407    - Fix: do not dispatch on_write callback if no packets are available.
408    - Fix WINDOW_UPDATE send and resend logic.
409    - Fix STREAM frame extension code.
410    - Fix: Drop unflushed data when stream is reset.
411    - Switch to tracking CWND using bytes rather than packets.
412    - Fix TCP friendly adjustment in cubic.
413    - Fix: do not generate invalid STOP_WAITING frames during high packet
414      loss.
415    - Pacer fixes.
416
4172017-12-18
418
419    - Fix: better follow cubic curve after idle period
420    - Fix: add missing parts to outgoing packet splitting code
421    - Fix: compilation using gcc 4.8.4
422
4232017-10-31
424
425    - Add APIs.txt -- describes LSQUIC APIs
426
4272017-10-31
428
429    - [API Change] Sendfile-like functionality is gone.  The stream no
430      longer opens files and deals with file descriptors.  (Among other
431      things, this makes the code more portable.)  Three writing functions
432      are provided:
433
434        lsquic_stream_write
435        lsquic_stream_writev
436        lsquic_stream_writef    (NEW)
437
438      lsquic_stream_writef() is given an abstract reader that has function
439      pointers for size() and read() functions which the user can implement.
440      This is the most flexible way.  lsquic_stream_write() and
441      lsquic_stream_writev() are now both implemented as wrappers around
442      lsquic_stream_writef().
443
444    - [OPTIMIZATION] When writing to stream, be it within or without the
445      on_write() callback, place data directly into packet buffer,
446      bypassing auxiliary data structures.  This reduces amount of memory
447      required, for the amount of data that can be written is limited
448      by the congestion window.
449
450      To support writes outside the on_write() callback, we keep N
451      outgoing packet buffers per connection which can be written to
452      by any stream.  One half of these are reserved for the highest
453      priority stream(s), the other half for all other streams.  This way,
454      low-priority streams cannot write instead of high-priority streams
455      and, on the other hand, low-priority streams get a chance to send
456      their packets out.
457
458      The algorithm is as follows:
459
460      - When user writes to stream outside of the callback:
461        - If this is the highest priority stream, place it onto the
462          reserved N/2 queue or fail.
463            (The actual size of this queue is dynamic -- MAX(N/2, CWND) --
464             rather than N/2, allowing high-priority streams to write as
465             much as can be sent.)
466        - If the stream is not the highest priority, try to place the
467          data onto the reserved N/2 queue or fail.
468      - When tick occurs *and* more packets can be scheduled:
469        - Transfer packets from the high N/2 queue to the scheduled
470          queue.
471        - If more scheduling is allowed:
472          - Call on_write callbacks for highest-priority streams,
473            placing resulting packets directly onto the scheduled queue.
474        - If more scheduling is allowed:
475          - Transfer packets from the low N/2 queue to the scheduled
476            queue.
477        - If more scheduling is allowed:
478          - Call on_write callbacks for non-highest-priority streams,
479            placing resulting packets directly onto the scheduled queue
480
481      The number N is currently 20, but it could be varied based on
482      resource usage.
483
484    - If stream is created due to incoming headers, make headers readable
485      from on_new.
486
487    - Outgoing packets are no longer marked non-writeable to prevent placing
488      more than one STREAM frame from the same stream into a single packet.
489      This property is maintained via code flow and an explicit check.
490      Packets for stream data are allocated using a special function.
491
492    - STREAM frame elision is cheaper, as we only perform it if a reset
493      stream has outgoing packets referencing it.
494
495    - lsquic_packet_out_t is smaller, as stream_rec elements are now
496      inside a union.
497
4982017-10-12
499
500    - Do not send RST_STREAM when stream is closed for reading
501    - Raise maximum header size from 4K to 64K
502    - Check header name and value lengths against maximum imposed by HPACK
503    - Fix NULL dereference in stream flow controller
504
5052017-10-09
506
507    - Hide handshake implementation behind a set of function pointers
508    - Use monotonically increasing clock
509    - Make sure that retx delay is not larger than the max of 60 seconds
510
5112017-09-29
512
513    - A few fixes to code and README
514
5152017-09-28
516
517    - Add support for Q041; drop support for Q040
518
5192017-09-27
520
521    - Fix CMakeLists.txt: BoringSSL include and lib was mixed up
522
5232017-09-26
524
525    - Add support for Mac OS
526    - Add support for Raspberry Pi
527    - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly
528
5292017-09-22
530
531    - Initial release
532