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