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