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