CHANGELOG revision 8cba36d8
12019-05-13 2 - 1.21.2 3 - [OPTIMIZATION] HPACK: use history to improve compression performance 4 52019-05-06 6 - 1.21.1 7 - [BUGFIX] If FIN or RST not received, don't delay stream destruction. 8 - [OPTIMIZATION] Speed up HPACK encoder by using same hash value to 9 search static and dynamic tables. 10 112019-04-12 12 - 1.21.0 13 - [FEATURE] Add qlog log module. 14 152019-04-01 16 - 1.20.0 17 - [FEATURE] Add support for Q046. 18 192019-03-19 20 - 1.19.6 21 - [BUGFIX] Ensure that Largest Observed does not decrease in ACKs we 22 send. ACK frames placed in packets in buffered queues (optimization 23 introduced in 1.17.15) can be preceded by an ACK frame generated later. 24 In this case, the older ACK frame should not be sent out, as Chromium- 25 based servers flags decrease in the ACK frame's Largest Observed value 26 as an error. 27 282019-03-05 29 - 1.19.5 30 - [BUGFIX] Use correct public key from PUBS based on KEXS index. 31 - [BUGFIX] Check flags before dispatching writes, avoiding assert. 32 - [BUGFIX] Set :scheme to "https" (instead of "HTTP"). 33 342019-02-25 35 - 1.19.4 36 - [BUGFIX] Check buffer bounds when looking up version in 0-RTT blob. 37 - [BUGFIX] http_client: don't fetch 0-rtt info if handshake failed. 38 - Log number of pacer calls at DEBUG, rather than NOTICE, level. 39 402019-02-18 41 - 1.19.3 42 - [BUGFIX] Q044: don't encode packet number in 6 bytes. Six-byte 43 packet number encoding does not exist in Q044. This fixes a 44 regression introduced in '[BUGFIX] Buffered packets can contain 45 ACK frames' -- we need to keep QUIC version in mind when selecting 46 the longest possible packet number encoding used for the buffered 47 packet that carries the ACK. 48 - [BUGFIX] Do not increase CWND when timeout occurs. 49 - http_client: support setting handshake timeout on command line. 50 Use -o handshake_to=timeout. 51 - http_client: use -k to connect UDP socket to pick up ICMP errors. 52 - http_client: allow pathless mode, when only handshake is performed 53 without issuing any requests. This can be done by simply not 54 specifying a -p flag on the command line. 55 562019-02-11 57 - 1.19.2 58 - [BUGFIX] Begin negotiation with version provided in 0-RTT info. 59 - [BUGFIX] Version checking in zero_rtt deserialize function. 60 612019-02-04 62 - 1.19.1 63 - [BUGFIX] Fix Windows build. 64 652019-02-04 66 - 1.19.0 67 - [FEATURE, API Change] 0-RTT support. Add function to export 0-RTT 68 information; it can be supplied to a subsequent connect() call. 69 - [FEATURE] Add -0 flag to http_client to exercise 0-RTT support. 70 - [BUGFIX] Resuscitate the Windows build. 71 - [BUGFIX] Send HTTP settings (max header list size) if necessary. 72 - [BUGFIX] Buffered packets can contain ACK frames. 73 - [BUGFIX] Make packet writeable once all STREAM frames are elided. 74 - [BUGFIX] Fix potential null dereference when realloc fails. 75 - cmake: simplify build configuration. 76 772019-01-28 78 - 1.18.0 79 - [API Change] Can specify clock granularity in engine settings. 80 - [BUGFIX] Pacer uses fixed clock granularity. Since the change on 81 2018-04-09, it is not necessary to try to approximate the next tick 82 time in the pacer: it can use fix clock granularity specified by 83 the user. 84 - [BUGFIX] Do not tick constantly before handshake is done. 85 - [BUGFIX] Do not exit tick prematurely: reuse packet with ACK. Even 86 if we cannot allocate *more* packets, we could still be able to write 87 to one already allocated. 88 - [BUGFIX] Do not schedule pacer if there are no lost packets. 89 902019-01-17 91 - 1.17.15 92 - [BUGFIX] http_client: make sure only one read per on_read() callback 93 is performed in the header conversion bypass (-B) mode. 94 - http_client: with -E, assign random priority when stream is created. 95 - [OPTIMIZATION] On immediate write, place an ACK frame into the first 96 buffered packet if an ACK is queued. This reduces the number of 97 standalone ACK packets. 98 - [OPTIMIZATION] Allow placing more than one STREAM frame from the same 99 stream into an outgoing packet. This change minimizes the number of 100 buffered packets required to store several small HTTP messages by 101 virtue of allowing more than one STREAM frame from HEADERS stream in 102 the same packet. 103 - [OPTIMIZATION] Flush headers when writing to buffered packets. This 104 causes the headers to be written to the same buffered packet queue, 105 thereby improving packet utilization, especially for small HTTP 106 messages. 107 1082019-01-16 109 - 1.17.14 110 - [FEATURE] http_client can now collect stats: time to connect, TTFB, 111 time to download, requests per seconds, and bandwidth. See -t flag. 112 - [BUGFIX] http_client: -B, -K, and -r can be used at the same time. 113 - [BUGFIX] http_client: do not display cert chain before each request. 114 Now this is only done once per connection, if the handshake is 115 successful and -a option is given. 116 - [BUGFIX] Do not wait to dispatch on_close() after reading. If a 117 stream is scheduled to be closed after on_read() callback returns, 118 close it immediately instead of waiting until the end of the tick. 119 If client creates new request from on_close() event, they will be 120 processed in the same tick instead of waiting for the next one. 121 - [BUGFIX] HEADERS stream is critical: always treat it with highest 122 priority. 123 1242019-01-10 125 - 1.17.12 126 - [FEATURE] http_client can now issue parallel requests in the context 127 of a single connection. See -w option. 128 1292019-01-03 130 - 1.17.11 131 - Fix strict aliasing warning in optimized compilation. 132 1332018-12-27 134 - 1.17.10 135 - Fix the example program to be able to use parallel connections 136 again. (See the -n argument.) 137 1382018-12-18 139 - 1.17.9 140 - [BUGFIX] Engine: reduce minimum batch size from 256 to 4 141 1422018-12-10 143 - 1.17.8 144 - [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux 145 1462018-12-03 147 - 1.17.7 148 - [BUGFIX] Do not unset PING alarm before ringing expired alarms. 149 This prevented PING from ever being sent. 150 1512018-11-29 152 - 1.17.6 153 - Add failsafe: resume sending packets after some time 154 155 The change puts a 1-second limit on the amount of time the engine 156 will not send packets after some packets are delayed. This makes 157 the library robust in case the user does not unblock the engine 158 explicitly using lsquic_engine_send_unsent_packets() call. 159 160 - [BUGFIX] Handle corner cases in send controller when packets are 161 a) delayed or b) dropped during repackaging. 162 - [BUGFIX] Memory leak: destroy buffered packets during controller 163 cleanup. 164 1652018-11-16 166 - 1.17.3 167 - [BUGFIX] Do not send STOP_WAITING frames when using Q044 168 1692018-10-19 170 - 1.17.2 171 - [BUGFIX] Memory leak in test_frame_rw unit test. 172 - [BUGFIX] Parsing packets with short IETF header: do not overwrite 173 flags. (Only a problem in unit tests -- benign otherwise.) 174 1752018-10-16 176 - 1.17.0 177 - [API Change] Packet out Memory Interface (PMI) update: 178 - Split PMI pool return into pmi_release and pmi_return 179 - PMI callbacks take peer_ctx and is_ipv6 arguments 180 - [BUGFIX] Fix use-after-free when certificate is updated 181 - Silence gcc warning in optimized mode by performing useless 182 initialization 183 - cmake: use the standard variable CMAKE_BUILD_TYPE instead of 184 DEVEL_MODE 185 1862018-10-03 187 - 1.16.0 188 - [API Change] Add lsquic_conn_n_avail_streams() 189 - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on 190 1912018-09-27 192 - 1.15.0 193 - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses 194 - [BUGFIX] free uncompressed headers correctly when error occurs 195 1962018-09-12 197 - 1.14.3 198 - [BUGFIX] Do not abort conn on STREAM frame for a reset stream 199 - [BUGFIX] Drop packets that would become empty due to repackaging. 200 Packets on the scheduled queue may be marked for repackaging. 201 Frames such as ACK frame that are never resent are removed from 202 repackaged packets. We must check that the newly repackaged packet 203 would not be empty. If it would be, it is destroyed instead and 204 the next packet on the scheduled queue is used. Note that this 205 change only affects the logic to return the next packet to be sent. 206 Lost packets that are being rescheduled are already processed in 207 this fashion. 208 - Byteswap CID before logging it - this makes it match Chrome CIDs. 209 (Except Q035, which is the last little-endian GQUIC version we 210 support.) 211 2122018-09-06 213 - 1.14.0 214 - [API Change] Disable packet sending if full batch cannot be sent 215 If lsquic_packets_out_f() cannot send the whole batch, disable 216 packet sending until lsquic_engine_send_unsent_packets() is called. 217 - [BUGFIX] Handle case when STREAM frame does not fit. 218 - [BUGFIX] Always allow incoming STREAM frames to overlap. Peers 219 may send overlapping STREAM frames even if using versions older 220 than Q043. 221 - Custom header set fixes: 222 - set "FIN reached" flag when custom header with FIN flag is 223 claimed; 224 - do not return custom header set for a reset stream. 225 2262018-08-27 227 228 - 1.13.0 229 - [FEATURE, API Change] Add ability to create custom header set 230 objects via callbacks. This avoids reading and re-parsing 231 headers from the stream. 232 2332018-08-27 234 235 - 1.12.4 236 - Fix memory leak when engine is destroyed 237 - Fix memory leak in http_client 238 - Fix gcc warning in unit tests 239 2402018-08-22 241 242 - 1.12.3 243 - [BUGFIX] Fix duplicate STREAM frame detection 244 2452018-08-20 246 247 - 1.12.2 248 - [BUGFIX] Update count of scheduled bytes when adjusting size of 249 an already-scheduled packet. 250 - Emit info instead of warning messages when stream is used in 251 unexpected ways. 252 2532018-08-17 254 255 - 1.12.0 256 - [FEATURE, API Change] Add support for certificate verification 257 2582018-08-16 259 260 - 1.11.1 261 - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code 262 2632018-08-15 264 265 - 1.11.0 266 - [FEATURE] Add support for Q044. 267 2682018-08-09 269 270 - 1.10.2 271 - [BUGFIX] Don't go over limit when creating delayed streams 272 2732018-07-10 274 275 - 1.10.1 276 - [BUGFIX] process connections after each batch of packets is read 277 This avoids a problem of accumulating a very large list of packets 278 (possible when speeds are high and socket's receive buffer is large) 279 and processing it all at once. 280 - If glibc is older than 2.17, link with rt. This is necessary for 281 clock_getres(2). 282 - Add version macros to lsquic.h; remove unnecessary includes. 283 2842018-06-13 285 286 - [BUGFIX] allow multiple parallel connections by default 287 288 Use the original method of tracking connections by CIDs by default. 289 If zero-sized CID support is turned on, connections are tracked by 290 the address. A new connection is not created if another connection 291 is using the same network address 292 2932018-05-30 294 295 - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets 296 2972018-05-24 298 299 - Close connection properly when packet encryption fails 300 3012018-05-23 302 303 - [BUGFIX] Do not produce packet sequence gaps due to delayed packets 304 3052018-05-21 306 307 - [API Change] Add optional callback to call when handshake is done 308 - [API Change, BUGFIX] After send failure, wait until transport available 309 3102018-05-18 311 312 - [API] Expose useful lsquic_ver2str[] in lsquic.h 313 - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision 314 - Improve checks of number of incoming streams limit and associated 315 error reporting. 316 - [BUGFIX] Command-line option `-6` now works correctly. 317 3182018-05-16 319 320 - [FEATURE] DNS resolution 321 - [BUGFIX] Frame insertion mis-ID as overlap instead of dup 322 - http_client: fix priority range generated by -E flag 323 3242018-05-09 325 326 - [FEATURE] Add support for Q043. 327 - Support for versions Q037, Q038, Q041, and Q042 has been removed. 328 - Fix typo in debug message. 329 - Fix code indentation. 330 - Add /* fallthru */ comment to stop newer gcc from complaining. 331 - Logger: fix compilation of optimized Windows build. 332 3332018-05-04 334 335 - [FEATURE] Add support for Q042. 336 - Remove comment: MSPC is obsolete (no code changes) 337 - Prog: use lsquic_str2ver() when processing -o version flag 338 - Remove unused CTIM and SRBF transport parameters 339 - Disable QUIC versions Q037 and Q038 by default 340 - Fix Windows compilation by including compat header file in 341 lshpack.c 342 - Address warnings produced by newer versions of gcc 343 - Future-proof: turn off -Werror 344 3452018-05-02 346 347 - [BUGFIX] Make lsquic_conn_quic_version() available 348 - Switch to using ls-hpack 1.1 349 - [BUGFIX] Do not ignore stream resets after receiving FIN 350 3512018-04-27 352 353 - HPACK: do not allow header block to end with table size update. 354 3552018-04-25 356 357 - [BUGFIX] Do not create gap in sent packnos when squeezing delayed 358 packets. 359 - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes. 360 - [BUGFIX] connections with blocked scheduled packets are not tickable 361 for sending. 362 - [BUGFIX] Conn is tickable if it wants to send a connection-level 363 frame. 364 3652018-04-23 366 367 - Fix busy loop: tickable must make progress. When connection is 368 self-reporting as tickable, it must make progress when ticked. There 369 are two issues: 370 1. If there are buffered packets, the connection is only tickable if 371 they can be sent out. 372 2. A connection is tickable if there are streams on the servicing 373 queue. When the tick occurs, we must service the stream 374 independent of whether any packets are sent. 375 - Fix assertion in pacer which can be incorrect under some 376 conditions. 377 - cmake: do not turn on address sanitizer if in Travis. 378 3792018-04-20 380 381 - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's 382 changes. 383 3842018-04-19 385 386 - [BUGFIX] Add connection to Tickable Queue on stream write 387 - cmake: use MSVC variable instead of trying to detect 388 - engine: improve connection incref/decref logging 389 - stream: don't ignore errors that may occur on triggered flush 390 - connection: remove obsolete method 391 - engine: indicate connection as tickable if previous call went 392 over threshold 393 3942018-04-09 395 396 [API Change, OPTIMIZATION] Only process conns that need to be processed 397 398 The API is simplified: do not expose the user code to several 399 queues. A "connection queue" is now an internal concept. 400 The user processes connections using the single function 401 lsquic_engine_process_conns(). When this function is called, 402 only those connections are processed that need to be processed. 403 A connection needs to be processed when: 404 405 1. New incoming packets have been fed to the connection. 406 2. User wants to read from a stream that is readable. 407 3. User wants to write to a stream that is writeable. 408 4. There are buffered packets that can be sent out. (This 409 means that the user wrote to a stream outside of the 410 lsquic library callback.) 411 5. A control frame (such as BLOCKED) needs to be sent out. 412 6. A stream needs to be serviced or delayed stream needs to 413 be created. 414 7. An alarm rings. 415 8. Pacer timer expires. 416 417 To achieve this, the library places the connections into two 418 priority queues (min heaps): 419 420 1. Tickable Queue; and 421 2. Advisory Tick Time queue (ATTQ). 422 423 Each time lsquic_engine_process_conns() is called, the Tickable 424 Queue is emptied. After the connections have been ticked, they are 425 queried again: if a connection is not being closed, it is placed 426 either in the Tickable Queue if it is ready to be ticked again or 427 it is placed in the Advisory Tick Time Queue. It is assumed that 428 a connection always has at least one timer set (the idle alarm). 429 430 The connections in the Tickable Queue are arranged in the least 431 recently ticked order. This lets connections that have been quiet 432 longer to get their packets scheduled first. 433 434 This change means that the library no longer needs to be ticked 435 periodically. The user code can query the library when is the 436 next tick event and schedule it exactly. When connections are 437 processed, only the tickable connections are processed, not *all* 438 the connections. When there are no tick events, it means that no 439 timer event is necessary -- only the file descriptor READ event 440 is active. 441 442 The following are improvements and simplifications that have 443 been triggered: 444 445 - Queue of connections with incoming packets is gone. 446 - "Pending Read/Write Events" Queue is gone (along with its 447 history and progress checks). This queue has become the 448 Tickable Queue. 449 - The connection hash no longer needs to track the connection 450 insertion order. 451 4522018-04-02 453 454 - [FEATURE] Windows support 455 456 - Reduce stack use -- outgoing packet batch is now allocated on the heap. 457 4582018-03-09 459 460 - [OPTIMIZATION] Merge series of ACKs if possible 461 462 Parsed single-range ACK frames (that is the majority of frames) are 463 saved in the connection and their processing is deferred until the 464 connection is ticked. If several ACKs come in a series between 465 adjacent ticks, we check whether the latest ACK is a strict superset 466 of the saved ACK. If it is, the older ACK is not processed. 467 468 If ACK frames can be merged, they are merged and only one of them is 469 either processed or saved. 470 471 - [OPTIMIZATION] Speed up ACK verification by simplifying send history. 472 473 Never generate a gap in the sent packet number sequence. This reduces 474 the send history to a single number instead of potentially a series of 475 packet ranges and thereby speeds up ACK verification. 476 477 By default, detecting a gap in the send history is not fatal: only a 478 single warning is generated per connection. The connection can continue 479 to operate even if the ACK verification code is not able to detect some 480 inconsistencies. 481 482 - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct 483 484 The first part of struct lsquic_send_ctl now consists of members that 485 are used in lsquic_send_ctl_got_ack() (in the absense of packet loss, 486 which is the normal case). To speed up reads and writes, we no longer 487 try to save space by using 8- and 16-bit integers. Use regular integer 488 width for everything. 489 490 - [OPTIMIZATION] Cache size of sent packet. 491 492 - [OPTIMIZATION] Keep track of the largest ACKed in packet_out 493 494 Instead of parsing our own ACK frames when packet has been acked, 495 use the value saved in the packet_out structure when the ACK frame 496 was generated. 497 498 - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop 499 500 - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed 501 502 - [OPTIMIZATION] Several code-level optimizations to ACK processing. 503 504 - Fix: http_client: fix -I flag; switch assert() to abort() 505 5062018-02-26 507 - [API Change] lsquic_engine_connect() returns pointer to the connection 508 object. 509 - [API Change] Add lsquic_conn_get_engine() to get engine object from 510 connection object. 511 - [API Change] Add lsquic_conn_status() to query connection status. 512 - [API Change] Add add lsquic_conn_set_ctx(). 513 - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345 514 - [OPTIMIZATION] Process handshake STREAM frames as soon as packet 515 arrives. 516 - [OPTIMIZATION] Do not compile expensive send controller sanity check 517 by default. 518 - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header. 519 - [OPTIMIZATION] Only make squeeze function call if necessary. 520 - [OPTIMIZATION] Speed up Q039 ACK frame parsing. 521 - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes. 522 - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating. 523 - [OPTIMIZATION] Prefetch next unacked packet when processing ACK. 524 - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are. 525 ordered. 526 - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation 527 - Fix: reset incoming streams that arrive after we send GOAWAY. 528 - Fix: delay client on_new_conn() call until connection is fully set up. 529 - Fixes to buffered packets logic: splitting, STREAM frame elision. 530 - Fix: do not dispatch on_write callback if no packets are available. 531 - Fix WINDOW_UPDATE send and resend logic. 532 - Fix STREAM frame extension code. 533 - Fix: Drop unflushed data when stream is reset. 534 - Switch to tracking CWND using bytes rather than packets. 535 - Fix TCP friendly adjustment in cubic. 536 - Fix: do not generate invalid STOP_WAITING frames during high packet 537 loss. 538 - Pacer fixes. 539 5402017-12-18 541 542 - Fix: better follow cubic curve after idle period 543 - Fix: add missing parts to outgoing packet splitting code 544 - Fix: compilation using gcc 4.8.4 545 5462017-10-31 547 548 - Add APIs.txt -- describes LSQUIC APIs 549 5502017-10-31 551 552 - [API Change] Sendfile-like functionality is gone. The stream no 553 longer opens files and deals with file descriptors. (Among other 554 things, this makes the code more portable.) Three writing functions 555 are provided: 556 557 lsquic_stream_write 558 lsquic_stream_writev 559 lsquic_stream_writef (NEW) 560 561 lsquic_stream_writef() is given an abstract reader that has function 562 pointers for size() and read() functions which the user can implement. 563 This is the most flexible way. lsquic_stream_write() and 564 lsquic_stream_writev() are now both implemented as wrappers around 565 lsquic_stream_writef(). 566 567 - [OPTIMIZATION] When writing to stream, be it within or without the 568 on_write() callback, place data directly into packet buffer, 569 bypassing auxiliary data structures. This reduces amount of memory 570 required, for the amount of data that can be written is limited 571 by the congestion window. 572 573 To support writes outside the on_write() callback, we keep N 574 outgoing packet buffers per connection which can be written to 575 by any stream. One half of these are reserved for the highest 576 priority stream(s), the other half for all other streams. This way, 577 low-priority streams cannot write instead of high-priority streams 578 and, on the other hand, low-priority streams get a chance to send 579 their packets out. 580 581 The algorithm is as follows: 582 583 - When user writes to stream outside of the callback: 584 - If this is the highest priority stream, place it onto the 585 reserved N/2 queue or fail. 586 (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- 587 rather than N/2, allowing high-priority streams to write as 588 much as can be sent.) 589 - If the stream is not the highest priority, try to place the 590 data onto the reserved N/2 queue or fail. 591 - When tick occurs *and* more packets can be scheduled: 592 - Transfer packets from the high N/2 queue to the scheduled 593 queue. 594 - If more scheduling is allowed: 595 - Call on_write callbacks for highest-priority streams, 596 placing resulting packets directly onto the scheduled queue. 597 - If more scheduling is allowed: 598 - Transfer packets from the low N/2 queue to the scheduled 599 queue. 600 - If more scheduling is allowed: 601 - Call on_write callbacks for non-highest-priority streams, 602 placing resulting packets directly onto the scheduled queue 603 604 The number N is currently 20, but it could be varied based on 605 resource usage. 606 607 - If stream is created due to incoming headers, make headers readable 608 from on_new. 609 610 - Outgoing packets are no longer marked non-writeable to prevent placing 611 more than one STREAM frame from the same stream into a single packet. 612 This property is maintained via code flow and an explicit check. 613 Packets for stream data are allocated using a special function. 614 615 - STREAM frame elision is cheaper, as we only perform it if a reset 616 stream has outgoing packets referencing it. 617 618 - lsquic_packet_out_t is smaller, as stream_rec elements are now 619 inside a union. 620 6212017-10-12 622 623 - Do not send RST_STREAM when stream is closed for reading 624 - Raise maximum header size from 4K to 64K 625 - Check header name and value lengths against maximum imposed by HPACK 626 - Fix NULL dereference in stream flow controller 627 6282017-10-09 629 630 - Hide handshake implementation behind a set of function pointers 631 - Use monotonically increasing clock 632 - Make sure that retx delay is not larger than the max of 60 seconds 633 6342017-09-29 635 636 - A few fixes to code and README 637 6382017-09-28 639 640 - Add support for Q041; drop support for Q040 641 6422017-09-27 643 644 - Fix CMakeLists.txt: BoringSSL include and lib was mixed up 645 6462017-09-26 647 648 - Add support for Mac OS 649 - Add support for Raspberry Pi 650 - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly 651 6522017-09-22 653 654 - Initial release 655