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