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