Landing Recent QUIC changes until 12:59 PM, Jan 4, 2019 UTC-8
No flag update.
n/a (Quartc only)
Merge internal change: 227900365
https://chromium-review.googlesource.com/c/chromium/src/+/1396864
Start ack decimation after 15 packets.
Quic currently starts ack decimation after 100 packets were received,
which may take anywhere from 3-10 seconds in low-bandwidth audio calls in Quartc.
Since we need approximately 15 packets to complete crypto handshake and the first
probe, we can start decimation sooner, after those 15 packets.
This change reduces number of standalone acks by approx 10%.
Merge internal change: 227897523
https://chromium-review.googlesource.com/c/chromium/src/+/1396863
Update incorrect comment in QuicIpAddress::ToPackedString().
Comment incorrectly states 6 and 18 bytes for IPv4 and IPv6 packed strings.
The actual packed string only includes IP address and not port, so it should be
4 and 16 bytes respectively. See also net_base::IPAddress::ToPackedString() which
is what's actually used in QuicIpAddressImpl.
Merge internal change: 227891227
https://chromium-review.googlesource.com/c/chromium/src/+/1396403
In QUIC, always send connection close or stateless reset for IETF connections.
Protected by ENABLED FLAGS_quic_reloadable_flag_quic_always_reset_ietf_connections.
Merge internal change: 227890958
https://chromium-review.googlesource.com/c/chromium/src/+/1396381
In QuicPacketReader, change server_address to self_address, client_address to peer_address.
Merge internal change: 227852906
https://chromium-review.googlesource.com/c/chromium/src/+/1396133
Remove self include in quic_file_utils_impl.h, no behavior change.
Merge internal change: 227788945
https://chromium-review.googlesource.com/c/chromium/src/+/1396402
In QUIC, use kInvalidPacketNumber instead of 0 to indicate invalid packet number. Variable renaming only. Not protected.
Merge internal change: 227527243
https://chromium-review.googlesource.com/c/chromium/src/+/1396841
Set a packet's transmission_type to the type of the last retransmittable frame on packet.
Protected by --quic_reloadable_flag_quic_set_transmission_type_for_next_frame.
Currently, a packet's transmission type is already the type of the last retransmittable
frame in the typical case. This cl fixes a bug where
1. QuicPacketCreator::SetTransmissionType($foo) is called, then
2. A AddFrame fails due to lack of space on packet, and triggers a flush.
In this case, the packet's transmission type is set to $foo even if the last frame on
packet is not of transmission type $foo.
Merge internal change: 227155319
https://chromium-review.googlesource.com/c/chromium/src/+/1396858
Allow modification of kkDefaultRetransmittablePacketsBeforeAck and kMinReceivedBeforeAckDecimation.
The latter setting (kMinReceivedBeforeAckDecimation) was chosen arbitrarily -- in Quartc,
the first 100 packets may take anywhere from 3-10 seconds to be sent. We'd like to be
able to configure this setting.
Merge internal change: 227130633
https://chromium-review.googlesource.com/c/chromium/src/+/1396857
Move QuicPacketCreator::ShouldRetransmit to QuicUtils::IsRetransmittableFrame.
Merge internal change: 226958566
https://chromium-review.googlesource.com/c/chromium/src/+/1396155
Enforce Largest Reference in QpackProgressiveDecoder.
Unfortunately I had to change *ToRealIndex() methods to *ToAbsoluteIndex() and
add an intermediate step. I'll try to see if I can convince folks to change the
spec to have absolute indexing be zero based instead of one based, that would
make things a lot easier.
I locally verified that the 105 test files encoded by four other implementations
still can be decoded and produce the expected header lists.
Merge internal change: 226560697
https://chromium-review.googlesource.com/c/chromium/src/+/1396837
Add tests for QpackProgressiveDecoder::DecodeLargestReference().
This algorithm is very complicated and thus error-prone, therefore it deserves
unit tests. Also, I might try to simplify it in the future, which will be much
safer with tests covering it.
Merge internal change: 226545731
https://chromium-review.googlesource.com/c/chromium/src/+/1396401
Refactor QpackProgressiveEncoder and QpackProgressiveDecoder.
Move QpackProgressiveEncoder into its own files and build target.
Rename ProgressiveDecoder to QpackProgressiveDecoder, move it out of
QpackDecoder, into its own files and build target.
Move HeadersHandleInterface from QpackDecoder to QpackProgressiveDecoder.
Move two HeadersHandleInterface implementations (mock and noop) from test file
anonymous namespaces to qpack_decoder_test_utils.h to make them easier to find
so that no one reimplements them if they need them.
Merge internal change: 226523544
https://chromium-review.googlesource.com/c/chromium/src/+/1396798
Implement Largest Reference unwrapping as per
https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#largest-reference.
Merge internal change: 226514396
https://chromium-review.googlesource.com/c/chromium/src/+/1396787
Enable dynamic table in offline QPACK decoder.
I verified on 105 test input files that they can be decoded and match the
expected decoded header lists:
qifs/encoded/qpack-03/{f5,h2o,proxygen}/*.0.?
qifs/encoded/qpack-05/ls-qpack/*.0.?
These are the most recent files for each encoder implementation.
The 0 in the filename means no blocking streams allowed.
Merge internal change: 226507874
https://chromium-review.googlesource.com/c/chromium/src/+/1396784
Add qpack_offline_decoder for offline interop testing.
See https://github.com/quicwg/base-drafts/wiki/QPACK-Offline-Interop.
qpack_offline_decoder_bin reads encoded data from a file, decodes it, and
compares it to a collection of expected header lists read from another file.
Comparison passes for all 9 files in the interop repository
https://github.com/qpackers/qifs that have dynamic table size of zero:
qpack-03/h2o/fb-req-hq.out.0.0.0
qpack-03/h2o/fb-resp-hq.out.0.0.0
qpack-03/h2o/netbsd-hq.out.0.0.0
qpack-03/ls-qpack/fb-req-hq.out.0.0.0
qpack-03/ls-qpack/fb-req.out.0.0.0
qpack-03/ls-qpack/fb-resp-hq.out.0.0.0
qpack-03/ls-qpack/fb-resp.out.0.0.0
qpack-03/ls-qpack/netbsd-hq.out.0.0.0
qpack-03/ls-qpack/netbsd.out.0.0.0
Merge internal change: 226427204
https://chromium-review.googlesource.com/c/chromium/src/+/1396797
Do not evict dynamic table entries before adding new entry.
Or else you might invalidate a QuicStringPiece. Happened to a friend.
Merge internal change: 226506973
https://chromium-review.googlesource.com/c/chromium/src/+/1396447
Implement dynamic table support in QpackDecoder.
Except for unwrapping Largest Reference which is encoded modulo 2 * MaxEntries,
see https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#rfc.section.4.5.1.1.
Merge internal change: 226430724
https://chromium-review.googlesource.com/c/chromium/src/+/1395814
Use uint64_t instead of size_t for indexing, dynamic table capacity, and entry size.
Use uint64_t instead of size_t for indices and index offsets (like Largest
Reference and Base Index), because these are communicated as HPACK variable
length integers, and uint64_t is the native size of HpackVarintEncoder and
HpackVarintDecoder.
Use uint64_t instead of size_t for dynamic table capacity and maximum dynamic
table capacity, because these are related to SETTINGS encoded as QUIC variable
length integers (different from HPACK variable length integers), and to dynamic
table capacity changes on the encoder stream encoded as HPACK variable length
integers, both with native sizes in uint64_t.
Use uint64_t instead of size_t for dynamic table entry size and MaxEntries,
because these are related to Largest Reference, above, in uint64_t.
The motivation is mostly to avoid implicit conversions while during arithmetics,
which might never have any practical implications, but might make compiler
tools, linters, fuzzers etc. annoyed.
Merge internal change: 226359692
https://chromium-review.googlesource.com/c/chromium/src/+/1395151
Add QpackDecoder::SetMaximumDynamicTableCapacity().
Expose HeaderTable::SetMaximumDynamicTableCapacity() to the owner of
QpackDecoder so that SETTINGS_HEADER_TABLE_SIZE (soon to be renamed
SETTINGS_MAXIMUM_DYNAMIC_TABLE_CAPACITY) value can be set.
Merge internal change: 226261638
https://chromium-review.googlesource.com/c/chromium/src/+/1395026
Add encoder and decoder streams to encoder and decoder.
Merge internal change: 226216127
https://chromium-review.googlesource.com/c/chromium/src/+/1395559
Add stream_id to progressive encoder and decoder.
This will be necessary for the encoder to keep track of references to dynamic
entries by stream id, and for the decoder so that a Header Acknowledgement
instruction (which contains the stream id) can be sent when decoding is
complete.
Also use the (currently incorrectly defined 32-bit, soon-to-be-64 bit)
QuicStreamId type instead of uint64_t for stream IDs.
Merge internal change: 225917487
https://chromium-review.googlesource.com/c/chromium/src/+/1395618
Extend QpackDecoderStreamReceiver class comment.
Merge internal change: 223452250
https://chromium-review.googlesource.com/c/chromium/src/+/1395196
Change-Id: I2e00b8a1f53eedd9a896ce436f0085db1a360513
Reviewed-on: https://chromium-review.googlesource.com/c/1396846
Reviewed-by: Ryan Hamilton <[email protected]>
Commit-Queue: Zhongyi Shi <[email protected]>
Cr-Commit-Position: refs/heads/master@{#620514}
diff --git a/net/BUILD.gn b/net/BUILD.gn
index f1936dca..a674f6c 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1331,6 +1331,10 @@
"third_party/quic/core/qpack/qpack_instruction_decoder.h",
"third_party/quic/core/qpack/qpack_instruction_encoder.cc",
"third_party/quic/core/qpack/qpack_instruction_encoder.h",
+ "third_party/quic/core/qpack/qpack_progressive_decoder.cc",
+ "third_party/quic/core/qpack/qpack_progressive_decoder.h",
+ "third_party/quic/core/qpack/qpack_progressive_encoder.cc",
+ "third_party/quic/core/qpack/qpack_progressive_encoder.h",
"third_party/quic/core/qpack/qpack_static_table.cc",
"third_party/quic/core/qpack/qpack_static_table.h",
"third_party/quic/core/quic_ack_listener_interface.cc",
@@ -1452,6 +1456,7 @@
"third_party/quic/platform/api/quic_export.h",
"third_party/quic/platform/api/quic_exported_stats.h",
"third_party/quic/platform/api/quic_fallthrough.h",
+ "third_party/quic/platform/api/quic_file_utils.cc",
"third_party/quic/platform/api/quic_file_utils.h",
"third_party/quic/platform/api/quic_flag_utils.h",
"third_party/quic/platform/api/quic_flags.h",
@@ -3149,6 +3154,8 @@
"quic/mock_encrypter.h",
"quic/test_task_runner.cc",
"quic/test_task_runner.h",
+ "third_party/quic/core/qpack/offline/qpack_offline_decoder.cc",
+ "third_party/quic/core/qpack/offline/qpack_offline_decoder.h",
"third_party/quic/core/qpack/qpack_decoder_test_utils.cc",
"third_party/quic/core/qpack/qpack_decoder_test_utils.h",
"third_party/quic/core/qpack/qpack_encoder_test_utils.cc",
@@ -3432,6 +3439,21 @@
"//third_party/protobuf:protobuf_lite",
]
}
+
+ executable("qpack_offline_decoder") {
+ testonly = true
+ sources = [
+ "third_party/quic/core/qpack/offline/qpack_offline_decoder_bin.cc",
+ ]
+ deps = [
+ ":net",
+ ":quic_test_tools",
+ ":simple_quic_tools",
+ "//base",
+ "//testing/gmock",
+ ]
+ }
+
executable("crypto_message_printer") {
sources = [
"tools/quic/crypto_message_printer_bin.cc",
@@ -5104,6 +5126,7 @@
"third_party/quic/core/qpack/qpack_header_table_test.cc",
"third_party/quic/core/qpack/qpack_instruction_decoder_test.cc",
"third_party/quic/core/qpack/qpack_instruction_encoder_test.cc",
+ "third_party/quic/core/qpack/qpack_progressive_decoder_test.cc",
"third_party/quic/core/qpack/qpack_round_trip_test.cc",
"third_party/quic/core/qpack/qpack_static_table_test.cc",
"third_party/quic/core/quic_alarm_test.cc",
@@ -6338,6 +6361,7 @@
deps = [
":net_fuzzer_test_support",
":quic_test_tools",
+ ":test_support",
"//base",
"//net",
]
@@ -6376,6 +6400,7 @@
deps = [
":net_fuzzer_test_support",
":quic_test_tools",
+ ":test_support",
"//base",
"//net",
]