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