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