CHANGELOG revision a37b0c96
12018-12-10 2 - 1.17.8 3 - [BUGFIX] Fix compilation on FreeBSD and 32-bit Linux 4 52018-12-03 6 - 1.17.7 7 - [BUGFIX] Do not unset PING alarm before ringing expired alarms. 8 This prevented PING from ever being sent. 9 102018-11-29 11 - 1.17.6 12 - Add failsafe: resume sending packets after some time 13 14 The change puts a 1-second limit on the amount of time the engine 15 will not send packets after some packets are delayed. This makes 16 the library robust in case the user does not unblock the engine 17 explicitly using lsquic_engine_send_unsent_packets() call. 18 19 - [BUGFIX] Handle corner cases in send controller when packets are 20 a) delayed or b) dropped during repackaging. 21 - [BUGFIX] Memory leak: destroy buffered packets during controller 22 cleanup. 23 242018-11-16 25 - 1.17.3 26 - [BUGFIX] Do not send STOP_WAITING frames when using Q044 27 282018-10-19 29 - 1.17.2 30 - [BUGFIX] Memory leak in test_frame_rw unit test. 31 - [BUGFIX] Parsing packets with short IETF header: do not overwrite 32 flags. (Only a problem in unit tests -- benign otherwise.) 33 342018-10-16 35 - 1.17.0 36 - [API Change] Packet out Memory Interface (PMI) update: 37 - Split PMI pool return into pmi_release and pmi_return 38 - PMI callbacks take peer_ctx and is_ipv6 arguments 39 - [BUGFIX] Fix use-after-free when certificate is updated 40 - Silence gcc warning in optimized mode by performing useless 41 initialization 42 - cmake: use the standard variable CMAKE_BUILD_TYPE instead of 43 DEVEL_MODE 44 452018-10-03 46 - 1.16.0 47 - [API Change] Add lsquic_conn_n_avail_streams() 48 - [BUGFIX] only dispatch crypto stream read events if WANT_READ is on 49 502018-09-27 51 - 1.15.0 52 - [API Change] Add LSCONN_ST_PEER_GOING_AWAY to the list of conn statuses 53 - [BUGFIX] free uncompressed headers correctly when error occurs 54 552018-09-12 56 - 1.14.3 57 - [BUGFIX] Do not abort conn on STREAM frame for a reset stream 58 - [BUGFIX] Drop packets that would become empty due to repackaging. 59 Packets on the scheduled queue may be marked for repackaging. 60 Frames such as ACK frame that are never resent are removed from 61 repackaged packets. We must check that the newly repackaged packet 62 would not be empty. If it would be, it is destroyed instead and 63 the next packet on the scheduled queue is used. Note that this 64 change only affects the logic to return the next packet to be sent. 65 Lost packets that are being rescheduled are already processed in 66 this fashion. 67 - Byteswap CID before logging it - this makes it match Chrome CIDs. 68 (Except Q035, which is the last little-endian GQUIC version we 69 support.) 70 712018-09-06 72 - 1.14.0 73 - [API Change] Disable packet sending if full batch cannot be sent 74 If lsquic_packets_out_f() cannot send the whole batch, disable 75 packet sending until lsquic_engine_send_unsent_packets() is called. 76 - [BUGFIX] Handle case when STREAM frame does not fit. 77 - [BUGFIX] Always allow incoming STREAM frames to overlap. Peers 78 may send overlapping STREAM frames even if using versions older 79 than Q043. 80 - Custom header set fixes: 81 - set "FIN reached" flag when custom header with FIN flag is 82 claimed; 83 - do not return custom header set for a reset stream. 84 852018-08-27 86 87 - 1.13.0 88 - [FEATURE, API Change] Add ability to create custom header set 89 objects via callbacks. This avoids reading and re-parsing 90 headers from the stream. 91 922018-08-27 93 94 - 1.12.4 95 - Fix memory leak when engine is destroyed 96 - Fix memory leak in http_client 97 - Fix gcc warning in unit tests 98 992018-08-22 100 101 - 1.12.3 102 - [BUGFIX] Fix duplicate STREAM frame detection 103 1042018-08-20 105 106 - 1.12.2 107 - [BUGFIX] Update count of scheduled bytes when adjusting size of 108 an already-scheduled packet. 109 - Emit info instead of warning messages when stream is used in 110 unexpected ways. 111 1122018-08-17 113 114 - 1.12.0 115 - [FEATURE, API Change] Add support for certificate verification 116 1172018-08-16 118 119 - 1.11.1 120 - [BUGFIX] Fix STOP_WAITING frame processing in the new Q044 code 121 1222018-08-15 123 124 - 1.11.0 125 - [FEATURE] Add support for Q044. 126 1272018-08-09 128 129 - 1.10.2 130 - [BUGFIX] Don't go over limit when creating delayed streams 131 1322018-07-10 133 134 - 1.10.1 135 - [BUGFIX] process connections after each batch of packets is read 136 This avoids a problem of accumulating a very large list of packets 137 (possible when speeds are high and socket's receive buffer is large) 138 and processing it all at once. 139 - If glibc is older than 2.17, link with rt. This is necessary for 140 clock_getres(2). 141 - Add version macros to lsquic.h; remove unnecessary includes. 142 1432018-06-13 144 145 - [BUGFIX] allow multiple parallel connections by default 146 147 Use the original method of tracking connections by CIDs by default. 148 If zero-sized CID support is turned on, connections are tracked by 149 the address. A new connection is not created if another connection 150 is using the same network address 151 1522018-05-30 153 154 - [FEATURE, API CHANGE] Support zero-sized CIDs in received packets 155 1562018-05-24 157 158 - Close connection properly when packet encryption fails 159 1602018-05-23 161 162 - [BUGFIX] Do not produce packet sequence gaps due to delayed packets 163 1642018-05-21 165 166 - [API Change] Add optional callback to call when handshake is done 167 - [API Change, BUGFIX] After send failure, wait until transport available 168 1692018-05-18 170 171 - [API] Expose useful lsquic_ver2str[] in lsquic.h 172 - [BUGFIX] Do not produce packet sequence gaps due to STREAM frame elision 173 - Improve checks of number of incoming streams limit and associated 174 error reporting. 175 - [BUGFIX] Command-line option `-6` now works correctly. 176 1772018-05-16 178 179 - [FEATURE] DNS resolution 180 - [BUGFIX] Frame insertion mis-ID as overlap instead of dup 181 - http_client: fix priority range generated by -E flag 182 1832018-05-09 184 185 - [FEATURE] Add support for Q043. 186 - Support for versions Q037, Q038, Q041, and Q042 has been removed. 187 - Fix typo in debug message. 188 - Fix code indentation. 189 - Add /* fallthru */ comment to stop newer gcc from complaining. 190 - Logger: fix compilation of optimized Windows build. 191 1922018-05-04 193 194 - [FEATURE] Add support for Q042. 195 - Remove comment: MSPC is obsolete (no code changes) 196 - Prog: use lsquic_str2ver() when processing -o version flag 197 - Remove unused CTIM and SRBF transport parameters 198 - Disable QUIC versions Q037 and Q038 by default 199 - Fix Windows compilation by including compat header file in 200 lshpack.c 201 - Address warnings produced by newer versions of gcc 202 - Future-proof: turn off -Werror 203 2042018-05-02 205 206 - [BUGFIX] Make lsquic_conn_quic_version() available 207 - Switch to using ls-hpack 1.1 208 - [BUGFIX] Do not ignore stream resets after receiving FIN 209 2102018-04-27 211 212 - HPACK: do not allow header block to end with table size update. 213 2142018-04-25 215 216 - [BUGFIX] Do not create gap in sent packnos when squeezing delayed 217 packets. 218 - [BUGFIX] sendctl checks for all unacked bytes, not just retx bytes. 219 - [BUGFIX] connections with blocked scheduled packets are not tickable 220 for sending. 221 - [BUGFIX] Conn is tickable if it wants to send a connection-level 222 frame. 223 2242018-04-23 225 226 - Fix busy loop: tickable must make progress. When connection is 227 self-reporting as tickable, it must make progress when ticked. There 228 are two issues: 229 1. If there are buffered packets, the connection is only tickable if 230 they can be sent out. 231 2. A connection is tickable if there are streams on the servicing 232 queue. When the tick occurs, we must service the stream 233 independent of whether any packets are sent. 234 - Fix assertion in pacer which can be incorrect under some 235 conditions. 236 - cmake: do not turn on address sanitizer if in Travis. 237 2382018-04-20 239 240 - [BUGFIX] Fix bug in lsquic_engine_connect() exposed by yesterday's 241 changes. 242 2432018-04-19 244 245 - [BUGFIX] Add connection to Tickable Queue on stream write 246 - cmake: use MSVC variable instead of trying to detect 247 - engine: improve connection incref/decref logging 248 - stream: don't ignore errors that may occur on triggered flush 249 - connection: remove obsolete method 250 - engine: indicate connection as tickable if previous call went 251 over threshold 252 2532018-04-09 254 255 [API Change, OPTIMIZATION] Only process conns that need to be processed 256 257 The API is simplified: do not expose the user code to several 258 queues. A "connection queue" is now an internal concept. 259 The user processes connections using the single function 260 lsquic_engine_process_conns(). When this function is called, 261 only those connections are processed that need to be processed. 262 A connection needs to be processed when: 263 264 1. New incoming packets have been fed to the connection. 265 2. User wants to read from a stream that is readable. 266 3. User wants to write to a stream that is writeable. 267 4. There are buffered packets that can be sent out. (This 268 means that the user wrote to a stream outside of the 269 lsquic library callback.) 270 5. A control frame (such as BLOCKED) needs to be sent out. 271 6. A stream needs to be serviced or delayed stream needs to 272 be created. 273 7. An alarm rings. 274 8. Pacer timer expires. 275 276 To achieve this, the library places the connections into two 277 priority queues (min heaps): 278 279 1. Tickable Queue; and 280 2. Advisory Tick Time queue (ATTQ). 281 282 Each time lsquic_engine_process_conns() is called, the Tickable 283 Queue is emptied. After the connections have been ticked, they are 284 queried again: if a connection is not being closed, it is placed 285 either in the Tickable Queue if it is ready to be ticked again or 286 it is placed in the Advisory Tick Time Queue. It is assumed that 287 a connection always has at least one timer set (the idle alarm). 288 289 The connections in the Tickable Queue are arranged in the least 290 recently ticked order. This lets connections that have been quiet 291 longer to get their packets scheduled first. 292 293 This change means that the library no longer needs to be ticked 294 periodically. The user code can query the library when is the 295 next tick event and schedule it exactly. When connections are 296 processed, only the tickable connections are processed, not *all* 297 the connections. When there are no tick events, it means that no 298 timer event is necessary -- only the file descriptor READ event 299 is active. 300 301 The following are improvements and simplifications that have 302 been triggered: 303 304 - Queue of connections with incoming packets is gone. 305 - "Pending Read/Write Events" Queue is gone (along with its 306 history and progress checks). This queue has become the 307 Tickable Queue. 308 - The connection hash no longer needs to track the connection 309 insertion order. 310 3112018-04-02 312 313 - [FEATURE] Windows support 314 315 - Reduce stack use -- outgoing packet batch is now allocated on the heap. 316 3172018-03-09 318 319 - [OPTIMIZATION] Merge series of ACKs if possible 320 321 Parsed single-range ACK frames (that is the majority of frames) are 322 saved in the connection and their processing is deferred until the 323 connection is ticked. If several ACKs come in a series between 324 adjacent ticks, we check whether the latest ACK is a strict superset 325 of the saved ACK. If it is, the older ACK is not processed. 326 327 If ACK frames can be merged, they are merged and only one of them is 328 either processed or saved. 329 330 - [OPTIMIZATION] Speed up ACK verification by simplifying send history. 331 332 Never generate a gap in the sent packet number sequence. This reduces 333 the send history to a single number instead of potentially a series of 334 packet ranges and thereby speeds up ACK verification. 335 336 By default, detecting a gap in the send history is not fatal: only a 337 single warning is generated per connection. The connection can continue 338 to operate even if the ACK verification code is not able to detect some 339 inconsistencies. 340 341 - [OPTIMIZATION] Rearrange the lsquic_send_ctl struct 342 343 The first part of struct lsquic_send_ctl now consists of members that 344 are used in lsquic_send_ctl_got_ack() (in the absense of packet loss, 345 which is the normal case). To speed up reads and writes, we no longer 346 try to save space by using 8- and 16-bit integers. Use regular integer 347 width for everything. 348 349 - [OPTIMIZATION] Cache size of sent packet. 350 351 - [OPTIMIZATION] Keep track of the largest ACKed in packet_out 352 353 Instead of parsing our own ACK frames when packet has been acked, 354 use the value saved in the packet_out structure when the ACK frame 355 was generated. 356 357 - [OPTIMIZATION] Take RTT sampling conditional out of ACK loop 358 359 - [OPTIMIZATION] ACK processing: only call clock_gettime() if needed 360 361 - [OPTIMIZATION] Several code-level optimizations to ACK processing. 362 363 - Fix: http_client: fix -I flag; switch assert() to abort() 364 3652018-02-26 366 - [API Change] lsquic_engine_connect() returns pointer to the connection 367 object. 368 - [API Change] Add lsquic_conn_get_engine() to get engine object from 369 connection object. 370 - [API Change] Add lsquic_conn_status() to query connection status. 371 - [API Change] Add add lsquic_conn_set_ctx(). 372 - [API Change] Add new timestamp format, e.g. 2017-03-21 13:43:46.671345 373 - [OPTIMIZATION] Process handshake STREAM frames as soon as packet 374 arrives. 375 - [OPTIMIZATION] Do not compile expensive send controller sanity check 376 by default. 377 - [OPTIMIZATION] Add fast path to gquic_be_gen_reg_pkt_header. 378 - [OPTIMIZATION] Only make squeeze function call if necessary. 379 - [OPTIMIZATION] Speed up Q039 ACK frame parsing. 380 - [OPTIMIZATION] Fit most used elements of packet_out into first 64 bytes. 381 - [OPTIMIZATION] Keep track of scheduled bytes instead of calculating. 382 - [OPTIMIZATION] Prefetch next unacked packet when processing ACK. 383 - [OPTIMIZATION] Leverage fact that ACK ranges and unacked list are. 384 ordered. 385 - [OPTIMIZATION] Reduce function pointer use for STREAM frame generation 386 - Fix: reset incoming streams that arrive after we send GOAWAY. 387 - Fix: delay client on_new_conn() call until connection is fully set up. 388 - Fixes to buffered packets logic: splitting, STREAM frame elision. 389 - Fix: do not dispatch on_write callback if no packets are available. 390 - Fix WINDOW_UPDATE send and resend logic. 391 - Fix STREAM frame extension code. 392 - Fix: Drop unflushed data when stream is reset. 393 - Switch to tracking CWND using bytes rather than packets. 394 - Fix TCP friendly adjustment in cubic. 395 - Fix: do not generate invalid STOP_WAITING frames during high packet 396 loss. 397 - Pacer fixes. 398 3992017-12-18 400 401 - Fix: better follow cubic curve after idle period 402 - Fix: add missing parts to outgoing packet splitting code 403 - Fix: compilation using gcc 4.8.4 404 4052017-10-31 406 407 - Add APIs.txt -- describes LSQUIC APIs 408 4092017-10-31 410 411 - [API Change] Sendfile-like functionality is gone. The stream no 412 longer opens files and deals with file descriptors. (Among other 413 things, this makes the code more portable.) Three writing functions 414 are provided: 415 416 lsquic_stream_write 417 lsquic_stream_writev 418 lsquic_stream_writef (NEW) 419 420 lsquic_stream_writef() is given an abstract reader that has function 421 pointers for size() and read() functions which the user can implement. 422 This is the most flexible way. lsquic_stream_write() and 423 lsquic_stream_writev() are now both implemented as wrappers around 424 lsquic_stream_writef(). 425 426 - [OPTIMIZATION] When writing to stream, be it within or without the 427 on_write() callback, place data directly into packet buffer, 428 bypassing auxiliary data structures. This reduces amount of memory 429 required, for the amount of data that can be written is limited 430 by the congestion window. 431 432 To support writes outside the on_write() callback, we keep N 433 outgoing packet buffers per connection which can be written to 434 by any stream. One half of these are reserved for the highest 435 priority stream(s), the other half for all other streams. This way, 436 low-priority streams cannot write instead of high-priority streams 437 and, on the other hand, low-priority streams get a chance to send 438 their packets out. 439 440 The algorithm is as follows: 441 442 - When user writes to stream outside of the callback: 443 - If this is the highest priority stream, place it onto the 444 reserved N/2 queue or fail. 445 (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- 446 rather than N/2, allowing high-priority streams to write as 447 much as can be sent.) 448 - If the stream is not the highest priority, try to place the 449 data onto the reserved N/2 queue or fail. 450 - When tick occurs *and* more packets can be scheduled: 451 - Transfer packets from the high N/2 queue to the scheduled 452 queue. 453 - If more scheduling is allowed: 454 - Call on_write callbacks for highest-priority streams, 455 placing resulting packets directly onto the scheduled queue. 456 - If more scheduling is allowed: 457 - Transfer packets from the low N/2 queue to the scheduled 458 queue. 459 - If more scheduling is allowed: 460 - Call on_write callbacks for non-highest-priority streams, 461 placing resulting packets directly onto the scheduled queue 462 463 The number N is currently 20, but it could be varied based on 464 resource usage. 465 466 - If stream is created due to incoming headers, make headers readable 467 from on_new. 468 469 - Outgoing packets are no longer marked non-writeable to prevent placing 470 more than one STREAM frame from the same stream into a single packet. 471 This property is maintained via code flow and an explicit check. 472 Packets for stream data are allocated using a special function. 473 474 - STREAM frame elision is cheaper, as we only perform it if a reset 475 stream has outgoing packets referencing it. 476 477 - lsquic_packet_out_t is smaller, as stream_rec elements are now 478 inside a union. 479 4802017-10-12 481 482 - Do not send RST_STREAM when stream is closed for reading 483 - Raise maximum header size from 4K to 64K 484 - Check header name and value lengths against maximum imposed by HPACK 485 - Fix NULL dereference in stream flow controller 486 4872017-10-09 488 489 - Hide handshake implementation behind a set of function pointers 490 - Use monotonically increasing clock 491 - Make sure that retx delay is not larger than the max of 60 seconds 492 4932017-09-29 494 495 - A few fixes to code and README 496 4972017-09-28 498 499 - Add support for Q041; drop support for Q040 500 5012017-09-27 502 503 - Fix CMakeLists.txt: BoringSSL include and lib was mixed up 504 5052017-09-26 506 507 - Add support for Mac OS 508 - Add support for Raspberry Pi 509 - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly 510 5112017-09-22 512 513 - Initial release 514