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