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