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