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