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