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