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