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