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