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