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