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