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