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