CHANGELOG revision c51ce338
12017-10-31 2 3 - [API Change] Sendfile-like functionality is gone. The stream no 4 longer opens files and deals with file descriptors. (Among other 5 things, this makes the code more portable.) Three writing functions 6 are provided: 7 8 lsquic_stream_write 9 lsquic_stream_writev 10 lsquic_stream_writef (NEW) 11 12 lsquic_stream_writef() is given an abstract reader that has function 13 pointers for size() and read() functions which the user can implement. 14 This is the most flexible way. lsquic_stream_write() and 15 lsquic_stream_writev() are now both implemented as wrappers around 16 lsquic_stream_writef(). 17 18 - [OPTIMIZATION] When writing to stream, be it within or without the 19 on_write() callback, place data directly into packet buffer, 20 bypassing auxiliary data structures. This reduces amount of memory 21 required, for the amount of data that can be written is limited 22 by the congestion window. 23 24 To support writes outside the on_write() callback, we keep N 25 outgoing packet buffers per connection which can be written to 26 by any stream. One half of these are reserved for the highest 27 priority stream(s), the other half for all other streams. This way, 28 low-priority streams cannot write instead of high-priority streams 29 and, on the other hand, low-priority streams get a chance to send 30 their packets out. 31 32 The algorithm is as follows: 33 34 - When user writes to stream outside of the callback: 35 - If this is the highest priority stream, place it onto the 36 reserved N/2 queue or fail. 37 (The actual size of this queue is dynamic -- MAX(N/2, CWND) -- 38 rather than N/2, allowing high-priority streams to write as 39 much as can be sent.) 40 - If the stream is not the highest priority, try to place the 41 data onto the reserved N/2 queue or fail. 42 - When tick occurs *and* more packets can be scheduled: 43 - Transfer packets from the high N/2 queue to the scheduled 44 queue. 45 - If more scheduling is allowed: 46 - Call on_write callbacks for highest-priority streams, 47 placing resulting packets directly onto the scheduled queue. 48 - If more scheduling is allowed: 49 - Transfer packets from the low N/2 queue to the scheduled 50 queue. 51 - If more scheduling is allowed: 52 - Call on_write callbacks for non-highest-priority streams, 53 placing resulting packets directly onto the scheduled queue 54 55 The number N is currently 20, but it could be varied based on 56 resource usage. 57 58 - If stream is created due to incoming headers, make headers readable 59 from on_new. 60 61 - Outgoing packets are no longer marked non-writeable to prevent placing 62 more than one STREAM frame from the same stream into a single packet. 63 This property is maintained via code flow and an explicit check. 64 Packets for stream data are allocated using a special function. 65 66 - STREAM frame elision is cheaper, as we only perform it if a reset 67 stream has outgoing packets referencing it. 68 69 - lsquic_packet_out_t is smaller, as stream_rec elements are now 70 inside a union. 71 722017-10-12 73 74 - Do not send RST_STREAM when stream is closed for reading 75 - Raise maximum header size from 4K to 64K 76 - Check header name and value lengths against maximum imposed by HPACK 77 - Fix NULL dereference in stream flow controller 78 792017-10-09 80 81 - Hide handshake implementation behind a set of function pointers 82 - Use monotonically increasing clock 83 - Make sure that retx delay is not larger than the max of 60 seconds 84 852017-09-29 86 87 - A few fixes to code and README 88 892017-09-28 90 91 - Add support for Q041; drop support for Q040 92 932017-09-27 94 95 - Fix CMakeLists.txt: BoringSSL include and lib was mixed up 96 972017-09-26 98 99 - Add support for Mac OS 100 - Add support for Raspberry Pi 101 - Fix BoringSSL compilation: include <openssl/hmac.h> explicitly 102 1032017-09-22 104 105 - Initial release 106