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