CHANGELOG revision ff892190
12019-12-18 2 - 2.7.3 3 - [DEBUG] Further dedup next advisory tick messages when reason is 4 the same. 5 - [BUGFIX] Update size of `a` array in TP struct. Fixes (benign) 6 GitHub bug #94. 7 - Use Cubic by default again instead of BBR, as it delivers more 8 consistent performance. 9 102019-12-11 11 - 2.7.2 12 - [BUGFIX] Send controller: update scheduled bytes when DCID length 13 changes (IETF client). 14 - [BUGFIX] Drop alarm check from sanity test. It no longer works now 15 that we use loss chains. 16 - [PORTABILITY] Fix build on Alpine Linux. 17 - [PORTABILITY] Fix build using XCode. 18 - Client initial DCID length: use RAND_bytes() instead of rand(3). 19 - Add unit tests for connection min heap. 20 - [DEBUG] Log CID in gQUIC handshake module 21 - [DEBUG] Turn on extra checks for IETF client send controller. 22 - [DEBUG] Dedup next advisory tick messages when reason is IDLE timer. 23 - [DEBUG] QPACK decoder handler: log header error code. 24 252019-12-05 26 - 2.7.1 27 - [BUGFIX] client: don't call ignore_init() in middle of batch send. 28 ignore_init() makes an assumption that the send controller has access 29 to all outgoing packets. This change wraps a few IETF full connection 30 methods to delay calling ignore_init() until the engine returns all 31 outgoing packets that were batched. 32 - [BUGFIX] set errno to EAGAIN if sendmmsg() can't send all of them. 33 This needs to be done because the value of errno may be lost on 34 some platforms. 35 - [BUGFIX] Typo that set all bits in sm_qflags lead to crashes. 36 - [BUGFIX] Do not cancel header block processing after failure, as 37 QPACK releases the reference in that case. 38 - [CLEANUP] IETF encrypt: replace assert(0) with a warning. 39 - Several small improvements to the test server. 40 412019-11-27 42 - 2.7.0 43 - [API, FEATURE] Close connection immediately when ea_packets_out() 44 fails with errno != EAGAIN. The API change is that errno is now 45 examined. Make sure to set it if using something other than 46 sendmsg() to send packets. 47 - [CLEANUP] Immediate close logic in IETF full conn. 48 - [CLEANUP] Fix bogus warning about uninitialized `pair' variable. 49 502019-11-22 51 - 2.6.7 52 - [FEATURE] Implement the QL extension (offered by default). 53 - [BUGFIX] Abort when encountering unexpected HTTP/3 frames. 54 - [BUGFIX] Acknowledge (QPACK) HTTP/3 trailers correctly. 55 - [DEBUG] Turn on debug message for next advisory tick. 56 572019-11-20 58 - 2.6.6 59 - [BUGFIX] Using HTTP/3 to HTTP/1.x converter. 60 - [BUGFIX] Truncate log messages instead of throwing them away. 61 622019-11-15 63 - 2.6.5 64 - [BUGFIX] High priority buffered packet queue length. 65 - [BUGFIX] Rain time calculation: max_ack_delay is in milliseconds. 66 672019-11-12 68 - 2.6.3 69 - [BUGFIX] Close DATA frames with empty payload correctly. 70 712019-11-11 72 - 2.6.2 73 - [BUGFIX] SCID!=ODCID rule applies to Retry packets, not regular 74 packets. 75 - [BUGFIX] Zero-RTT: BoringSSL no longer flips read/write secrets. 76 - [BUGFIX] Truncate ACK frame rather instead of aborting IETF 77 connection. 78 - [BUGFIX] Client: don't send duplicate reset tokens. 79 - [BUGFIX] Remove invalid assertion in H3 framing code. 80 - Silence a warning in send ctl by restructuring switch() statement. 81 822019-11-08 83 - 2.6.1 84 - [BUGFIX] set retry token on all resubmitted packets. 85 - Event log: log sent packet flags. In particular, this allows one 86 to see whether token was sent. 87 - Don't migrate client if es_allow_migration is false. 88 892019-11-07 90 - 2.6.0 91 - [FEATURE] QUIC and HTTP/3 Internet Draft 24 support 92 932019-11-07 94 - 2.5.2 95 - [BUGFIX] argument order to gQUIC client constructor. Regression 96 introduced in 2.5.0. 97 - [BUGFIX] split buffered packet error recovery: destroy the correct 98 packet. 99 1002019-11-04 101 - 2.5.1 102 - [BUGFIX] Fix double-free when emptying a packet number space. 103 - [BUGFIX] http_server: fix md5sum handler: handle EOF correctly. 104 - [BUGFIX] Use random values in bits 4 and 5 of the first byte of 105 verneg packets (regression introduced in 2.5.0). 106 - [OPTIMIZATION] Don't compile in expensive attq checks by default. 107 - [OPTIMIZATION] http_server: compile regexes only once. 108 1092019-10-31 110 - 2.5.0 111 - [API] lsquic_engine_connect() can now be passed QUIC version to use. 112 - [OPTIMIZATION] Queue opportunistic ACKs if there is data to be sent. 113 - [BUGFIX] Don't evict streams from priority iterator if there is 114 only one queue. 115 - [OPTIMIZATION, BUGFIX] Several other optimizations and bug fixes. 116 - Use ls-qpack v0.10.7. 117 1182019-10-24 119 - 2.4.10 120 - [BUGFIX] IETF QUIC server: fix uninitialized variable use. 121 - [BUGFIX] make sure TLSv1.3 is not disabled in SSL object. 122 - [BUGFIX] Use issuer name and serial number to cache certs (SKID 123 values are not unique). 124 - [BUGFIX] Always set the idle alarm in IETF connection so that it 125 can time out. 126 - Use ls-qpack v0.10.6, as it silences some warnings. 127 1282019-10-21 129 - 2.4.8 130 - [OPTIMIZATION, BUGFIX] Use ls-qpack v0.10.5. 131 1322019-10-15 133 - 2.4.7 134 - Add echo client and server to the distibution. 135 - Add MD5 client and server to the distibution. 136 - Fix http_client: check command-line arguments better, prevent crash. 137 - Fix IETF conn: can_write_ack() should only care about APP PNS. 138 - Client: delay stream creation until handshake succeds. 139 - Reset HTTP stream whose write end is closed prematurely. 140 - Fix tickable(): mirror behavior of tick() wrt buffered packets. 141 - Log reason why engine is tickable. 142 1432019-10-11 144 - 2.4.6 145 - Minor code cleanup and logging improvements. 146 - Server and client programs: include library version (e.g. 2.4.6) 147 into `server' and `user-agent' headers. 148 1492019-10-08 150 - 2.4.5 151 - [OPTIMIZATION]: flush encoder stream only when necessary. 152 - [BUGFIX] Use ls-qpack v0.10.2 for new API -- and for a bug fix. 153 - [BUGFIX] Typo in IETF conn SETTINGS writer. 154 - Use latest BoringSSL. 155 1562019-10-08 157 - 2.4.4 158 - [API] Add lsquic_alpn2ver() to aid parsing Alt-Svc header. 159 - [BUGFIX] NULL dereference when H3 frame header would be split. 160 - [BUGFIX] Do not close fixed-size H3 frame prematurely. 161 - [BUGFIX] Allow PING frames in IETF mini conn. 162 - [BUGFIX] Mini conns: don't send any packets after receiving 163 CONNECTION_CLOSE. 164 - [BUGFIX] Client migration: reserve slot for DCID from transport params. 165 - [BUGFIX] Allow max_early_data_size=0 -- early_data might not be there. 166 - [BUGFIX] Use an invalid stream number to reset BPT cache (zero is now a 167 valid stream number). 168 - [SPEC] Use FINAL_SIZE_ERROR when FIN mismatch is detected. 169 - [OPTIMIZATION] Closed connection only gets one chance to send packets. 170 - [OPTIMIZATION] Flush headers stream before packetizing stream data. 171 - [OPTIMIZATION] process QPACK encoder STREAM frames immediately. 172 - Update ls-qpack to v0.10.1. 173 1742019-09-30 175 - 2.4.3 176 - Add GQUIC versions to the list of h3 ALPNs for Alt-Svc header. 177 For example, h3-Q043. Chrome will switch to using this format at 178 some point in the future. 179 - [BUGFIX] Send correct value in max_streams_uni transport param 180 - [SPEC] Abort IETF QUIC connection if max_early_data_size is not set 181 to 0xFFFFFFFF 182 1832019-09-23 184 - 2.4.2 185 - [BUGFIX] H3 framing: fix zero-byte write when space is available 186 - [BUGFIX] Don't send STREAM frame when incoming unidirectgional stream 187 is closed 188 - [BUGFIX] Cancel all pending writes by stream reset by a GOAWAY 189 - [BUGFIX] Fix use-after-free in IETF full conn 190 - [OPTIMIZATION] Wait for session tickets for two seconds and then drop 191 SSL object and crypto streams. 192 1932019-09-18 194 - 2.4.0 195 - [FEATURE] QUIC and HTTP/3 Internet Draft 23 support 196 1972019-09-13 198 - 2.3.1 199 - [BUGFIX] Fix memory leaks 200 - [BUGFIX] Fix unit tests 201 2022019-09-12 203 - 2.3.0 204 - [FEATURE] BBR congestion control is on by default 205 - [BUGFIX] BBR app-limited logic 206 - [BUGFIX] Fix uninitialized warnings in IETF 207 - [BUGFIX] Update ls-qpack to v0.9.14 208 - [CLEANUP] Code cleanup 209 2102019-09-11 211 - 2.2.0 212 - [FEATURE] Server code is included in the library 213 - [FEATURE] IETF QUIC and HTTP/3 Support (ID-22) 214 2152019-05-13 216 - 1.21.2 217 - [OPTIMIZATION] HPACK: use history to improve compression performance 218 2192019-05-06 220 - 1.21.1 221 - [BUGFIX] If FIN or RST not received, don't delay stream destruction. 222 - [OPTIMIZATION] Speed up HPACK encoder by using same hash value to 223 search static and dynamic tables. 224 2252019-04-12 226 - 1.21.0 227 - [FEATURE] Add qlog log module. 228 2292019-04-01 230 - 1.20.0 231 - [FEATURE] Add support for Q046. 232 2332019-03-19 234 - 1.19.6 235 - [BUGFIX] Ensure that Largest Observed does not decrease in ACKs we 236 send. ACK frames placed in packets in buffered queues (optimization 237 introduced in 1.17.15) can be preceded by an ACK frame generated later. 238 In this case, the older ACK frame should not be sent out, as Chromium- 239 based servers flags decrease in the ACK frame's Largest Observed value 240 as an error. 241 2422019-03-05 243 - 1.19.5 244 - [BUGFIX] Use correct public key from PUBS based on KEXS index. 245 - [BUGFIX] Check flags before dispatching writes, avoiding assert. 246 - [BUGFIX] Set :scheme to "https" (instead of "HTTP"). 247 2482019-02-25 249 - 1.19.4 250 - [BUGFIX] Check buffer bounds when looking up version in 0-RTT blob. 251 - [BUGFIX] http_client: don't fetch 0-rtt info if handshake failed. 252 - Log number of pacer calls at DEBUG, rather than NOTICE, level. 253 2542019-02-18 255 - 1.19.3 256 - [BUGFIX] Q044: don't encode packet number in 6 bytes. Six-byte 257 packet number encoding does not exist in Q044. This fixes a 258 regression introduced in '[BUGFIX] Buffered packets can contain 259 ACK frames' -- we need to keep QUIC version in mind when selecting 260 the longest possible packet number encoding used for the buffered 261 packet that carries the ACK. 262 - [BUGFIX] Do not increase CWND when timeout occurs. 263 - http_client: support setting handshake timeout on command line. 264 Use -o handshake_to=timeout. 265 - http_client: use -k to connect UDP socket to pick up ICMP errors. 266 - http_client: allow pathless mode, when only handshake is performed 267 without issuing any requests. This can be done by simply not 268 specifying a -p flag on the command line. 269 2702019-02-11 271 - 1.19.2 272 - [BUGFIX] Begin negotiation with version provided in 0-RTT info. 273 - [BUGFIX] Version checking in zero_rtt deserialize function. 274 2752019-02-04 276 - 1.19.1 277 - [BUGFIX] Fix Windows build. 278 2792019-02-04 280 - 1.19.0 281 - [FEATURE, API Change] 0-RTT support. Add function to export 0-RTT 282 information; it can be supplied to a subsequent connect() call. 283 - [FEATURE] Add -0 flag to http_client to exercise 0-RTT support. 284 - [BUGFIX] Resuscitate the Windows build. 285 - [BUGFIX] Send HTTP settings (max header list size) if necessary. 286 - [BUGFIX] Buffered packets can contain ACK frames. 287 - [BUGFIX] Make packet writeable once all STREAM frames are elided. 288 - [BUGFIX] Fix potential null dereference when realloc fails. 289 - cmake: simplify build configuration. 290 2912019-01-28 292 - 1.18.0 293 - [API Change] Can specify clock granularity in engine settings. 294 - [BUGFIX] Pacer uses fixed clock granularity. Since the change on 295 2018-04-09, it is not necessary to try to approximate the next tick 296 time in the pacer: it can use fix clock granularity specified by 297 the user. 298 - [BUGFIX] Do not tick constantly before handshake is done. 299 - [BUGFIX] Do not exit tick prematurely: reuse packet with ACK. Even 300 if we cannot allocate *more* packets, we could still be able to write 301 to one already allocated. 302 - [BUGFIX] Do not schedule pacer if there are no lost packets. 303 3042019-01-17 305 - 1.17.15 306 - [BUGFIX] http_client: make sure only one read per on_read() callback 307 is performed in the header conversion bypass (-B) mode. 308 - http_client: with -E, assign random priority when stream is created. 309 - [OPTIMIZATION] On immediate write, place an ACK frame into the first 310 buffered packet if an ACK is queued. This reduces the number of 311 standalone ACK packets. 312 - [OPTIMIZATION] Allow placing more than one STREAM frame from the same 313 stream into an outgoing packet. This change minimizes the number of 314 buffered packets required to store several small HTTP messages by 315 virtue of allowing more than one STREAM frame from HEADERS stream in 316 the same packet. 317 - [OPTIMIZATION] Flush headers when writing to buffered packets. This 318 causes the headers to be written to the same buffered packet queue, 319 thereby improving packet utilization, especially for small HTTP 320 messages. 321 3222019-01-16 323 - 1.17.14 324 - [FEATURE] http_client can now collect stats: time to connect, TTFB, 325 time to download, requests per seconds, and bandwidth. See -t flag. 326 - [BUGFIX] http_client: -B, -K, and -r can be used at the same time. 327 - [BUGFIX] http_client: do not display cert chain before each request. 328 Now this is only done once per connection, if the handshake is 329 successful and -a option is given. 330 - [BUGFIX] Do not wait to dispatch on_close() after reading. If a 331 stream is scheduled to be closed after on_read() callback returns, 332 close it immediately instead of waiting until the end of the tick. 333 If client creates new request from on_close() event, they will be 334 processed in the same tick instead of waiting for the next one. 335 - [BUGFIX] HEADERS stream is critical: always treat it with highest 336 priority. 337 3382019-01-10 339 - 1.17.12 340 - [FEATURE] http_client can now issue parallel requests in the context 341 of a single connection. See -w option. 342 3432019-01-03 344 - 1.17.11 345 - Fix strict aliasing warning in optimized compilation. 346 3472018-12-27 348 - 1.17.10 349 - Fix the example program to be able to use parallel connections 350 again. (See the -n argument.) 351 3522018-12-18 353 - 1.17.9 354 - [BUGFIX] Engine: reduce minimum batch size from 256 to 4 355 3562018-12-10 357 - 1.17.8 358 - [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux 359 3602018-12-03 361 - 1.17.7 362 - [BUGFIX] Do not unset PING alarm before ringing expired alarms. 363 This prevented PING from ever being sent. 364 3652018-11-29 366 - 1.17.6 367 - Add failsafe: resume sending packets after some time 368 369 The change puts a 1-second limit on the amount of time the engine 370 will not send packets after some packets are delayed. This makes 371 the library robust in case the user does not unblock the engine 372 explicitly using lsquic_engine_send_unsent_packets() call. 373 374 - [BUGFIX] Handle corner cases in send controller when packets are 375 a) delayed or b) dropped during repackaging. 376 - [BUGFIX] Memory leak: destroy buffered packets during controller 377 cleanup. 378 3792018-11-16 380 - 1.17.3 381 - [BUGFIX] Do not send STOP_WAITING frames when using Q044 382 3832018-10-19 384 - 1.17.2 385 - [BUGFIX] Memory leak in test_frame_rw unit test. 386 - [BUGFIX] Parsing packets with short IETF header: do not overwrite 387 flags. (Only a problem in unit tests -- benign otherwise.) 388 3892018-10-16 390 - 1.17.0 391 - [API Change] Packet out Memory Interface (PMI) update: 392 - Split PMI pool return into pmi_release and pmi_return 393 - PMI callbacks take peer_ctx and is_ipv6 arguments 394 - [BUGFIX] Fix use-after-free when certificate is updated 395 - Silence gcc warning in optimized mode by performing useless 396 initialization 397 - cmake: use the standard variable CMAKE_BUILD_TYPE instead of 398 DEVEL_MODE 399 4002018-10-03 401 - 1.16.0 402 - [API Change] Add lsquic_conn_n_avail_streams() 403 - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on 404 4052018-09-27 406 - 1.15.0 407 - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses 408 - [BUGFIX] free uncompressed headers correctly when error occurs 409 4102018-09-12 411 - 1.14.3 412 - [BUGFIX] Do not abort conn on STREAM frame for a reset stream 413 - [BUGFIX] Drop packets that would become empty due to repackaging. 414 Packets on the scheduled queue may be marked for repackaging. 415 Frames such as ACK frame that are never resent are removed from 416 repackaged packets. We must check that the newly repackaged packet 417 would not be empty. If it would be, it is destroyed instead and 418 the next packet on the scheduled queue is used. Note that this 419 change only affects the logic to return the next packet to be sent. 420 Lost packets that are being rescheduled are already processed in 421 this fashion. 422 - Byteswap CID before logging it - this makes it match Chrome CIDs. 423 (Except Q035, which is the last little-endian GQUIC version we 424 support.) 425 4262018-09-06 427 - 1.14.0 428 - [API Change] Disable packet sending if full batch cannot be sent 429 If lsquic_packets_out_f() cannot send the whole batch, disable 430 packet sending until lsquic_engine_send_unsent_packets() is called. 431 - [BUGFIX] Handle case when STREAM frame does not fit. 432 - [BUGFIX] Always allow incoming STREAM frames to overlap. Peers 433 may send overlapping STREAM frames even if using versions older 434 than Q043. 435 - Custom header set fixes: 436 - set "FIN reached" flag when custom header with FIN flag is 437 claimed; 438 - do not return custom header set for a reset stream. 439 4402018-08-27 441 442 - 1.13.0 443 - [FEATURE, API Change] Add ability to create custom header set 444 objects via callbacks. This avoids reading and re-parsing 445 headers from the stream. 446 4472018-08-27 448 449 - 1.12.4 450 - Fix memory leak when engine is destroyed 451 - Fix memory leak in http_client 452 - Fix gcc warning in unit tests 453 4542018-08-22 455 456 - 1.12.3 457 - [BUGFIX] Fix duplicate STREAM frame detection 458 4592018-08-20 460 461 - 1.12.2 462 - [BUGFIX] Update count of scheduled bytes when adjusting size of 463 an already-scheduled packet. 464 - Emit info instead of warning messages when stream is used in 465 unexpected ways. 466 4672018-08-17 468 469 - 1.12.0 470 - [FEATURE, API Change] Add support for certificate verification 471 4722018-08-16 473 474 - 1.11.1 475 - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code 476 4772018-08-15 478 479 - 1.11.0 480 - [FEATURE] Add support for Q044. 481 4822018-08-09 483 484 - 1.10.2 485 - [BUGFIX] Don't go over limit when creating delayed streams 486 4872018-07-10 488 489 - 1.10.1 490 - [BUGFIX] process connections after each batch of packets is read 491 This avoids a problem of accumulating a very large list of packets 492 (possible when speeds are high and socket's receive buffer is large) 493 and processing it all at once. 494 - If glibc is older than 2.17, link with rt. This is necessary for 495 clock_getres(2). 496 - Add version macros to lsquic.h; remove unnecessary includes. 497 4982018-06-13 499 500 - [BUGFIX] allow multiple parallel connections by default 501 502 Use the original method of tracking connections by CIDs by default. 503 If zero-sized CID support is turned on, connections are tracked by 504 the address. A new connection is not created if another connection 505 is using the same network address 506 5072018-05-30 508 509 - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets 510 5112018-05-24 512 513 - Close connection properly when packet encryption fails 514 5152018-05-23 516 517 - [BUGFIX] Do not produce packet sequence gaps due to delayed packets 518 5192018-05-21 520 521 - [API Change] Add optional callback to call when handshake is done 522 - [API Change, BUGFIX] After send failure, wait until transport available 523 5242018-05-18 525 526 - [API] Expose useful lsquic_ver2str[] in lsquic.h 527 - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision 528 - Improve checks of number of incoming streams limit and associated 529 error reporting. 530 - [BUGFIX] Command-line option `-6` now works correctly. 531 5322018-05-16 533 534 - [FEATURE] DNS resolution 535 - [BUGFIX] Frame insertion mis-ID as overlap instead of dup 536 - http_client: fix priority range generated by -E flag 537 5382018-05-09 539 540 - [FEATURE] Add support for Q043. 541 - Support for versions Q037, Q038, Q041, and Q042 has been removed. 542 - Fix typo in debug message. 543 - Fix code indentation. 544 - Add /* fallthru */ comment to stop newer gcc from complaining. 545 - Logger: fix compilation of optimized Windows build. 546 5472018-05-04 548 549 - [FEATURE] Add support for Q042. 550 - Remove comment: MSPC is obsolete (no code changes) 551 - Prog: use lsquic_str2ver() when processing -o version flag 552 - Remove unused CTIM and SRBF transport parameters 553 - Disable QUIC versions Q037 and Q038 by default 554 - Fix Windows compilation by including compat header file in 555 lshpack.c 556 - Address warnings produced by newer versions of gcc 557 - Future-proof: turn off -Werror 558 5592018-05-02 560 561 - [BUGFIX] Make lsquic_conn_quic_version() available 562 - Switch to using ls-hpack 1.1 563 - [BUGFIX] Do not ignore stream resets after receiving FIN 564 5652018-04-27 566 567 - HPACK: do not allow header block to end with table size update. 568 5692018-04-25 570 571 - [BUGFIX] Do not create gap in sent packnos when squeezing delayed 572 packets. 573 - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes. 574 - [BUGFIX] connections with blocked scheduled packets are not tickable 575 for sending. 576 - [BUGFIX] Conn is tickable if it wants to send a connection-level 577 frame. 578 5792018-04-23 580 581 - Fix busy loop: tickable must make progress. When connection is 582 self-reporting as tickable, it must make progress when ticked. There 583 are two issues: 584 1. If there are buffered packets, the connection is only tickable if 585 they can be sent out. 586 2. A connection is tickable if there are streams on the servicing 587 queue. When the tick occurs, we must service the stream 588 independent of whether any packets are sent. 589 - Fix assertion in pacer which can be incorrect under some 590 conditions. 591 - cmake: do not turn on address sanitizer if in Travis. 592 5932018-04-20 594 595 - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's 596 changes. 597 5982018-04-19 599 600 - [BUGFIX] Add connection to Tickable Queue on stream write 601 - cmake: use MSVC variable instead of trying to detect 602 - engine: improve connection incref/decref logging 603 - stream: don't ignore errors that may occur on triggered flush 604 - connection: remove obsolete method 605 - engine: indicate connection as tickable if previous call went 606 over threshold 607 6082018-04-09 609 610 [API Change, OPTIMIZATION] Only process conns that need to be processed 611 612 The API is simplified: do not expose the user code to several 613 queues. A "connection queue" is now an internal concept. 614 The user processes connections using the single function 615 lsquic_engine_process_conns(). When this function is called, 616 only those connections are processed that need to be processed. 617 A connection needs to be processed when: 618 619 1. New incoming packets have been fed to the connection. 620 2. User wants to read from a stream that is readable. 621 3. User wants to write to a stream that is writeable. 622 4. There are buffered packets that can be sent out. (This 623 means that the user wrote to a stream outside of the 624 lsquic library callback.) 625 5. A control frame (such as BLOCKED) needs to be sent out. 626 6. A stream needs to be serviced or delayed stream needs to 627 be created. 628 7. An alarm rings. 629 8. Pacer timer expires. 630 631 To achieve this, the library places the connections into two 632 priority queues (min heaps): 633 634 1. Tickable Queue; and 635 2. Advisory Tick Time queue (ATTQ). 636 637 Each time lsquic_engine_process_conns() is called, the Tickable 638 Queue is emptied. After the connections have been ticked, they are 639 queried again: if a connection is not being closed, it is placed 640 either in the Tickable Queue if it is ready to be ticked again or 641 it is placed in the Advisory Tick Time Queue. It is assumed that 642 a connection always has at least one timer set (the idle alarm). 643 644 The connections in the Tickable Queue are arranged in the least 645 recently ticked order. This lets connections that have been quiet 646 longer to get their packets scheduled first. 647 648 This change means that the library no longer needs to be ticked 649 periodically. The user code can query the library when is the 650 next tick event and schedule it exactly. When connections are 651 processed, only the tickable connections are processed, not *all* 652 the connections. When there are no tick events, it means that no 653 timer event is necessary -- only the file descriptor READ event 654 is active. 655 656 The following are improvements and simplifications that have 657 been triggered: 658 659 - Queue of connections with incoming packets is gone. 660 - "Pending Read/Write Events" Queue is gone (along with its 661 history and progress checks). This queue has become the 662 Tickable Queue. 663 - The connection hash no longer needs to track the connection 664 insertion order. 665 6662018-04-02 667 668 - [FEATURE] Windows support 669 670 - Reduce stack use -- outgoing packet batch is now allocated on the heap. 671 6722018-03-09 673 674 - [OPTIMIZATION] Merge series of ACKs if possible 675 676 Parsed single-range ACK frames (that is the majority of frames) are 677 saved in the connection and their processing is deferred until the 678 connection is ticked. If several ACKs come in a series between 679 adjacent ticks, we check whether the latest ACK is a strict superset 680 of the saved ACK. If it is, the older ACK is not processed. 681 682 If ACK frames can be merged, they are merged and only one of them is 683 either processed or saved. 684 685 - [OPTIMIZATION] Speed up ACK verification by simplifying send history. 686 687 Never generate a gap in the sent packet number sequence. This reduces 688 the send history to a single number instead of potentially a series of 689 packet ranges and thereby speeds up ACK verification. 690 691 By default, detecting a gap in the send history is not fatal: only a 692 single warning is generated per connection. The connection can continue 693 to operate even if the ACK verification code is not able to detect some 694 inconsistencies. 695 696 - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct 697 698 The first part of struct lsquic_send_ctl now consists of members that 699 are used in lsquic_send_ctl_got_ack() (in the absense of packet loss, 700 which is the normal case). To speed up reads and writes, we no longer 701 try to save space by using 8- and 16-bit integers. Use regular integer 702 width for everything. 703 704 - [OPTIMIZATION] Cache size of sent packet. 705 706 - [OPTIMIZATION] Keep track of the largest ACKed in packet_out 707 708 Instead of parsing our own ACK frames when packet has been acked, 709 use the value saved in the packet_out structure when the ACK frame 710 was generated. 711 712 - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop 713 714 - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed 715 716 - [OPTIMIZATION] Several code-level optimizations to ACK processing. 717 718 - Fix: http_client: fix -I flag; switch assert() to abort() 719 7202018-02-26 721 - [API Change] lsquic_engine_connect() returns pointer to the connection 722 object. 723 - [API Change] Add lsquic_conn_get_engine() to get engine object from 724 connection object. 725 - [API Change] Add lsquic_conn_status() to query connection status. 726 - [API Change] Add add lsquic_conn_set_ctx(). 727 - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345 728 - [OPTIMIZATION] Process handshake STREAM frames as soon as packet 729 arrives. 730 - [OPTIMIZATION] Do not compile expensive send controller sanity check 731 by default. 732 - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header. 733 - [OPTIMIZATION] Only make squeeze function call if necessary. 734 - [OPTIMIZATION] Speed up Q039 ACK frame parsing. 735 - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes. 736 - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating. 737 - [OPTIMIZATION] Prefetch next unacked packet when processing ACK. 738 - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are. 739 ordered. 740 - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation 741 - Fix: reset incoming streams that arrive after we send GOAWAY. 742 - Fix: delay client on_new_conn() call until connection is fully set up. 743 - Fixes to buffered packets logic: splitting, STREAM frame elision. 744 - Fix: do not dispatch on_write callback if no packets are available. 745 - Fix WINDOW_UPDATE send and resend logic. 746 - Fix STREAM frame extension code. 747 - Fix: Drop unflushed data when stream is reset. 748 - Switch to tracking CWND using bytes rather than packets. 749 - Fix TCP friendly adjustment in cubic. 750 - Fix: do not generate invalid STOP_WAITING frames during high packet 751 loss. 752 - Pacer fixes. 753 7542017-12-18 755 756 - Fix: better follow cubic curve after idle period 757 - Fix: add missing parts to outgoing packet splitting code 758 - Fix: compilation using gcc 4.8.4 759 7602017-10-31 761 762 - Add APIs.txt -- describes LSQUIC APIs 763 7642017-10-31 765 766 - [API Change] Sendfile-like functionality is gone. The stream no 767 longer opens files and deals with file descriptors. (Among other 768 things, this makes the code more portable.) Three writing functions 769 are provided: 770 771 lsquic_stream_write 772 lsquic_stream_writev 773 lsquic_stream_writef (NEW) 774 775 lsquic_stream_writef() is given an abstract reader that has function 776 pointers for size() and read() functions which the user can implement. 777 This is the most flexible way. lsquic_stream_write() and 778 lsquic_stream_writev() are now both implemented as wrappers around 779 lsquic_stream_writef(). 780 781 - [OPTIMIZATION] When writing to stream, be it within or without the 782 on_write() callback, place data directly into packet buffer, 783 bypassing auxiliary data structures. This reduces amount of memory 784 required, for the amount of data that can be written is limited 785 by the congestion window. 786 787 To support writes outside the on_write() callback, we keep N 788 outgoing packet buffers per connection which can be written to 789 by any stream. One half of these are reserved for the highest 790 priority stream(s), the other half for all other streams. This way, 791 low-priority streams cannot write instead of high-priority streams 792 and, on the other hand, low-priority streams get a chance to send 793 their packets out. 794 795 The algorithm is as follows: 796 797 - When user writes to stream outside of the callback: 798 - If this is the highest priority stream, place it onto the 799 reserved N/2 queue or fail. 800 (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- 801 rather than N/2, allowing high-priority streams to write as 802 much as can be sent.) 803 - If the stream is not the highest priority, try to place the 804 data onto the reserved N/2 queue or fail. 805 - When tick occurs *and* more packets can be scheduled: 806 - Transfer packets from the high N/2 queue to the scheduled 807 queue. 808 - If more scheduling is allowed: 809 - Call on_write callbacks for highest-priority streams, 810 placing resulting packets directly onto the scheduled queue. 811 - If more scheduling is allowed: 812 - Transfer packets from the low N/2 queue to the scheduled 813 queue. 814 - If more scheduling is allowed: 815 - Call on_write callbacks for non-highest-priority streams, 816 placing resulting packets directly onto the scheduled queue 817 818 The number N is currently 20, but it could be varied based on 819 resource usage. 820 821 - If stream is created due to incoming headers, make headers readable 822 from on_new. 823 824 - Outgoing packets are no longer marked non-writeable to prevent placing 825 more than one STREAM frame from the same stream into a single packet. 826 This property is maintained via code flow and an explicit check. 827 Packets for stream data are allocated using a special function. 828 829 - STREAM frame elision is cheaper, as we only perform it if a reset 830 stream has outgoing packets referencing it. 831 832 - lsquic_packet_out_t is smaller, as stream_rec elements are now 833 inside a union. 834 8352017-10-12 836 837 - Do not send RST_STREAM when stream is closed for reading 838 - Raise maximum header size from 4K to 64K 839 - Check header name and value lengths against maximum imposed by HPACK 840 - Fix NULL dereference in stream flow controller 841 8422017-10-09 843 844 - Hide handshake implementation behind a set of function pointers 845 - Use monotonically increasing clock 846 - Make sure that retx delay is not larger than the max of 60 seconds 847 8482017-09-29 849 850 - A few fixes to code and README 851 8522017-09-28 853 854 - Add support for Q041; drop support for Q040 855 8562017-09-27 857 858 - Fix CMakeLists.txt: BoringSSL include and lib was mixed up 859 8602017-09-26 861 862 - Add support for Mac OS 863 - Add support for Raspberry Pi 864 - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly 865 8662017-09-22 867 868 - Initial release 869