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