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