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