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