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