CHANGELOG revision 96f77e20
12018-05-30
2
3    - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets
4
52018-05-24
6
7    - Close connection properly when packet encryption fails
8
92018-05-23
10
11    - [BUGFIX] Do not produce packet sequence gaps due to delayed packets
12
132018-05-21
14
15    - [API Change] Add optional callback to call when handshake is done
16    - [API Change, BUGFIX] After send failure, wait until transport available
17
182018-05-18
19
20    - [API] Expose useful lsquic_ver2str[] in lsquic.h
21    - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision
22    - Improve checks of number of incoming streams limit and associated
23      error reporting.
24    - [BUGFIX] Command-line option `-6` now works correctly.
25
262018-05-16
27
28    - [FEATURE] DNS resolution
29    - [BUGFIX] Frame insertion mis-ID as overlap instead of dup
30    - http_client: fix priority range generated by -E flag
31
322018-05-09
33
34    - [FEATURE] Add support for Q043.
35    - Support for versions Q037, Q038, Q041, and Q042 has been removed.
36    - Fix typo in debug message.
37    - Fix code indentation.
38    - Add /* fallthru */ comment to stop newer gcc from complaining.
39    - Logger: fix compilation of optimized Windows build.
40
412018-05-04
42
43    - [FEATURE] Add support for Q042.
44    - Remove comment: MSPC is obsolete (no code changes)
45    - Prog: use lsquic_str2ver() when processing -o version flag
46    - Remove unused CTIM and SRBF transport parameters
47    - Disable QUIC versions Q037 and Q038 by default
48    - Fix Windows compilation by including compat header file in
49      lshpack.c
50    - Address warnings produced by newer versions of gcc
51    - Future-proof: turn off -Werror
52
532018-05-02
54
55    - [BUGFIX] Make lsquic_conn_quic_version() available
56    - Switch to using ls-hpack 1.1
57    - [BUGFIX] Do not ignore stream resets after receiving FIN
58
592018-04-27
60
61    - HPACK: do not allow header block to end with table size update.
62
632018-04-25
64
65    - [BUGFIX] Do not create gap in sent packnos when squeezing delayed
66      packets.
67    - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes.
68    - [BUGFIX] connections with blocked scheduled packets are not tickable
69      for sending.
70    - [BUGFIX] Conn is tickable if it wants to send a connection-level
71      frame.
72
732018-04-23
74
75    - Fix busy loop: tickable must make progress.  When connection is
76      self-reporting as tickable, it must make progress when ticked.  There
77      are two issues:
78        1. If there are buffered packets, the connection is only tickable if
79           they can be sent out.
80        2. A connection is tickable if there are streams on the servicing
81           queue.  When the tick occurs, we must service the stream
82           independent of whether any packets are sent.
83    - Fix assertion in pacer which can be incorrect under some
84      conditions.
85    - cmake: do not turn on address sanitizer if in Travis.
86
872018-04-20
88
89    - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's
90      changes.
91
922018-04-19
93
94    - [BUGFIX] Add connection to Tickable Queue on stream write
95    - cmake: use MSVC variable instead of trying to detect
96    - engine: improve connection incref/decref logging
97    - stream: don't ignore errors that may occur on triggered flush
98    - connection: remove obsolete method
99    - engine: indicate connection as tickable if previous call went
100      over threshold
101
1022018-04-09
103
104    [API Change, OPTIMIZATION] Only process conns that need to be processed
105
106    The API is simplified: do not expose the user code to several
107    queues.  A "connection queue" is now an internal concept.
108    The user processes connections using the single function
109    lsquic_engine_process_conns().  When this function is called,
110    only those connections are processed that need to be processed.
111    A connection needs to be processed when:
112
113        1. New incoming packets have been fed to the connection.
114        2. User wants to read from a stream that is readable.
115        3. User wants to write to a stream that is writeable.
116        4. There are buffered packets that can be sent out.  (This
117           means that the user wrote to a stream outside of the
118           lsquic library callback.)
119        5. A control frame (such as BLOCKED) needs to be sent out.
120        6. A stream needs to be serviced or delayed stream needs to
121           be created.
122        7. An alarm rings.
123        8. Pacer timer expires.
124
125    To achieve this, the library places the connections into two
126    priority queues (min heaps):
127
128        1. Tickable Queue; and
129        2. Advisory Tick Time queue (ATTQ).
130
131    Each time lsquic_engine_process_conns() is called, the Tickable
132    Queue is emptied.  After the connections have been ticked, they are
133    queried again: if a connection is not being closed, it is placed
134    either in the Tickable Queue if it is ready to be ticked again or
135    it is placed in the Advisory Tick Time Queue.  It is assumed that
136    a connection always has at least one timer set (the idle alarm).
137
138    The connections in the Tickable Queue are arranged in the least
139    recently ticked order.  This lets connections that have been quiet
140    longer to get their packets scheduled first.
141
142    This change means that the library no longer needs to be ticked
143    periodically.  The user code can query the library when is the
144    next tick event and schedule it exactly.  When connections are
145    processed, only the tickable connections are processed, not *all*
146    the connections.  When there are no tick events, it means that no
147    timer event is necessary -- only the file descriptor READ event
148    is active.
149
150    The following are improvements and simplifications that have
151    been triggered:
152
153        - Queue of connections with incoming packets is gone.
154        - "Pending Read/Write Events" Queue is gone (along with its
155          history and progress checks).  This queue has become the
156          Tickable Queue.
157        - The connection hash no longer needs to track the connection
158          insertion order.
159
1602018-04-02
161
162    - [FEATURE] Windows support
163
164    - Reduce stack use -- outgoing packet batch is now allocated on the heap.
165
1662018-03-09
167
168    - [OPTIMIZATION] Merge series of ACKs if possible
169
170      Parsed single-range ACK frames (that is the majority of frames) are
171      saved in the connection and their processing is deferred until the
172      connection is ticked.  If several ACKs come in a series between
173      adjacent ticks, we check whether the latest ACK is a strict superset
174      of the saved ACK.  If it is, the older ACK is not processed.
175
176      If ACK frames can be merged, they are merged and only one of them is
177      either processed or saved.
178
179    - [OPTIMIZATION] Speed up ACK verification by simplifying send history.
180
181      Never generate a gap in the sent packet number sequence.  This reduces
182      the send history to a single number instead of potentially a series of
183      packet ranges and thereby speeds up ACK verification.
184
185      By default, detecting a gap in the send history is not fatal: only a
186      single warning is generated per connection.  The connection can continue
187      to operate even if the ACK verification code is not able to detect some
188      inconsistencies.
189
190    - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct
191
192      The first part of struct lsquic_send_ctl now consists of members that
193      are used in lsquic_send_ctl_got_ack() (in the absense of packet loss,
194      which is the normal case).  To speed up reads and writes, we no longer
195      try to save space by using 8- and 16-bit integers.  Use regular integer
196      width for everything.
197
198    - [OPTIMIZATION] Cache size of sent packet.
199
200    - [OPTIMIZATION] Keep track of the largest ACKed in packet_out
201
202      Instead of parsing our own ACK frames when packet has been acked,
203      use the value saved in the packet_out structure when the ACK frame
204      was generated.
205
206    - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop
207
208    - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed
209
210    - [OPTIMIZATION] Several code-level optimizations to ACK processing.
211
212    - Fix: http_client: fix -I flag; switch assert() to abort()
213
2142018-02-26
215    - [API Change] lsquic_engine_connect() returns pointer to the connection
216      object.
217    - [API Change] Add lsquic_conn_get_engine() to get engine object from
218      connection object.
219    - [API Change] Add lsquic_conn_status() to query connection status.
220    - [API Change] Add add lsquic_conn_set_ctx().
221    - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345
222    - [OPTIMIZATION] Process handshake STREAM frames as soon as packet
223      arrives.
224    - [OPTIMIZATION] Do not compile expensive send controller sanity check
225      by default.
226    - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header.
227    - [OPTIMIZATION] Only make squeeze function call if necessary.
228    - [OPTIMIZATION] Speed up Q039 ACK frame parsing.
229    - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes.
230    - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating.
231    - [OPTIMIZATION] Prefetch next unacked packet when processing ACK.
232    - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are.
233      ordered.
234    - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation
235    - Fix: reset incoming streams that arrive after we send GOAWAY.
236    - Fix: delay client on_new_conn() call until connection is fully set up.
237    - Fixes to buffered packets logic: splitting, STREAM frame elision.
238    - Fix: do not dispatch on_write callback if no packets are available.
239    - Fix WINDOW_UPDATE send and resend logic.
240    - Fix STREAM frame extension code.
241    - Fix: Drop unflushed data when stream is reset.
242    - Switch to tracking CWND using bytes rather than packets.
243    - Fix TCP friendly adjustment in cubic.
244    - Fix: do not generate invalid STOP_WAITING frames during high packet
245      loss.
246    - Pacer fixes.
247
2482017-12-18
249
250    - Fix: better follow cubic curve after idle period
251    - Fix: add missing parts to outgoing packet splitting code
252    - Fix: compilation using gcc 4.8.4
253
2542017-10-31
255
256    - Add APIs.txt -- describes LSQUIC APIs
257
2582017-10-31
259
260    - [API Change] Sendfile-like functionality is gone.  The stream no
261      longer opens files and deals with file descriptors.  (Among other
262      things, this makes the code more portable.)  Three writing functions
263      are provided:
264
265        lsquic_stream_write
266        lsquic_stream_writev
267        lsquic_stream_writef    (NEW)
268
269      lsquic_stream_writef() is given an abstract reader that has function
270      pointers for size() and read() functions which the user can implement.
271      This is the most flexible way.  lsquic_stream_write() and
272      lsquic_stream_writev() are now both implemented as wrappers around
273      lsquic_stream_writef().
274
275    - [OPTIMIZATION] When writing to stream, be it within or without the
276      on_write() callback, place data directly into packet buffer,
277      bypassing auxiliary data structures.  This reduces amount of memory
278      required, for the amount of data that can be written is limited
279      by the congestion window.
280
281      To support writes outside the on_write() callback, we keep N
282      outgoing packet buffers per connection which can be written to
283      by any stream.  One half of these are reserved for the highest
284      priority stream(s), the other half for all other streams.  This way,
285      low-priority streams cannot write instead of high-priority streams
286      and, on the other hand, low-priority streams get a chance to send
287      their packets out.
288
289      The algorithm is as follows:
290
291      - When user writes to stream outside of the callback:
292        - If this is the highest priority stream, place it onto the
293          reserved N/2 queue or fail.
294            (The actual size of this queue is dynamic -- MAX(N/2, CWND) --
295             rather than N/2, allowing high-priority streams to write as
296             much as can be sent.)
297        - If the stream is not the highest priority, try to place the
298          data onto the reserved N/2 queue or fail.
299      - When tick occurs *and* more packets can be scheduled:
300        - Transfer packets from the high N/2 queue to the scheduled
301          queue.
302        - If more scheduling is allowed:
303          - Call on_write callbacks for highest-priority streams,
304            placing resulting packets directly onto the scheduled queue.
305        - If more scheduling is allowed:
306          - Transfer packets from the low N/2 queue to the scheduled
307            queue.
308        - If more scheduling is allowed:
309          - Call on_write callbacks for non-highest-priority streams,
310            placing resulting packets directly onto the scheduled queue
311
312      The number N is currently 20, but it could be varied based on
313      resource usage.
314
315    - If stream is created due to incoming headers, make headers readable
316      from on_new.
317
318    - Outgoing packets are no longer marked non-writeable to prevent placing
319      more than one STREAM frame from the same stream into a single packet.
320      This property is maintained via code flow and an explicit check.
321      Packets for stream data are allocated using a special function.
322
323    - STREAM frame elision is cheaper, as we only perform it if a reset
324      stream has outgoing packets referencing it.
325
326    - lsquic_packet_out_t is smaller, as stream_rec elements are now
327      inside a union.
328
3292017-10-12
330
331    - Do not send RST_STREAM when stream is closed for reading
332    - Raise maximum header size from 4K to 64K
333    - Check header name and value lengths against maximum imposed by HPACK
334    - Fix NULL dereference in stream flow controller
335
3362017-10-09
337
338    - Hide handshake implementation behind a set of function pointers
339    - Use monotonically increasing clock
340    - Make sure that retx delay is not larger than the max of 60 seconds
341
3422017-09-29
343
344    - A few fixes to code and README
345
3462017-09-28
347
348    - Add support for Q041; drop support for Q040
349
3502017-09-27
351
352    - Fix CMakeLists.txt: BoringSSL include and lib was mixed up
353
3542017-09-26
355
356    - Add support for Mac OS
357    - Add support for Raspberry Pi
358    - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly
359
3602017-09-22
361
362    - Initial release
363