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