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