You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/08/27 07:10:14 UTC
[trafficserver] branch quic-latest updated (4c0dc17 -> d9e1e1a)
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.
from 4c0dc17 Add tests for QPACK
new ea29ae1 Cleanup: Suppress nbytes on debug log if it is INT64_MAX
new 45dd5ae Fix sending generated STREAM frame
new d9e1e1a Remove handshake stream check
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
iocore/net/QUICNetVConnection.cc | 7 ++++---
iocore/net/quic/QUICApplication.cc | 18 ++++++++++++++----
iocore/net/quic/QUICStreamManager.cc | 4 +---
iocore/net/quic/test/test_QUICStreamManager.cc | 5 -----
4 files changed, 19 insertions(+), 15 deletions(-)
[trafficserver] 01/03: Cleanup: Suppress nbytes on debug log if it
is INT64_MAX
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit ea29ae141cc5891b92f87835cc00f5feaf35a790
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Aug 27 14:59:27 2018 +0900
Cleanup: Suppress nbytes on debug log if it is INT64_MAX
---
iocore/net/quic/QUICApplication.cc | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/iocore/net/quic/QUICApplication.cc b/iocore/net/quic/QUICApplication.cc
index 54bf199..1d77135 100644
--- a/iocore/net/quic/QUICApplication.cc
+++ b/iocore/net/quic/QUICApplication.cc
@@ -62,8 +62,13 @@ int64_t
QUICStreamIO::read(uint8_t *buf, int64_t len)
{
if (is_debug_tag_set(tag_stream_io)) {
- QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " read_avail=%" PRId64 " read_len=%" PRId64, this->_read_vio->nbytes,
- this->_read_vio->ndone, this->_read_buffer_reader->read_avail(), len);
+ if (this->_read_vio->nbytes == INT64_MAX) {
+ QUICStreamIODebug("nbytes=-" PRId64 " ndone=%" PRId64 " read_avail=%" PRId64 " read_len=%" PRId64, this->_read_vio->ndone,
+ this->_read_buffer_reader->read_avail(), len);
+ } else {
+ QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " read_avail=%" PRId64 " read_len=%" PRId64, this->_read_vio->nbytes,
+ this->_read_vio->ndone, this->_read_buffer_reader->read_avail(), len);
+ }
}
int64_t nread = this->_read_buffer_reader->read(buf, len);
@@ -114,8 +119,13 @@ QUICStreamIO::write(IOBufferReader *r, int64_t len)
if (bytes_avail > 0) {
if (is_debug_tag_set(tag_stream_io)) {
- QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " write_avail=%" PRId64 " write_len=%" PRId64, this->_write_vio->nbytes,
- this->_write_vio->ndone, bytes_avail, len);
+ if (this->_write_vio->nbytes == INT64_MAX) {
+ QUICStreamIODebug("nbytes=- ndone=%" PRId64 " write_avail=%" PRId64 " write_len=%" PRId64, this->_write_vio->ndone,
+ bytes_avail, len);
+ } else {
+ QUICStreamIODebug("nbytes=%" PRId64 " ndone=%" PRId64 " write_avail=%" PRId64 " write_len=%" PRId64,
+ this->_write_vio->nbytes, this->_write_vio->ndone, bytes_avail, len);
+ }
}
int64_t bytes_len = std::min(bytes_avail, len);
[trafficserver] 03/03: Remove handshake stream check
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit d9e1e1a86d83ef6fa50ce1a7b76c96df9e4dbc13
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Aug 27 12:57:55 2018 +0900
Remove handshake stream check
---
iocore/net/quic/QUICStreamManager.cc | 4 +---
iocore/net/quic/test/test_QUICStreamManager.cc | 5 -----
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/iocore/net/quic/QUICStreamManager.cc b/iocore/net/quic/QUICStreamManager.cc
index fa8f637..f63715e 100644
--- a/iocore/net/quic/QUICStreamManager.cc
+++ b/iocore/net/quic/QUICStreamManager.cc
@@ -302,9 +302,7 @@ QUICStreamManager::total_offset_received() const
// FIXME Iterating all (open + closed) streams is expensive
for (QUICStream *s = this->stream_list.head; s; s = s->link.next) {
- if (s->id() != 0) {
- total_offset_received += s->largest_offset_received();
- }
+ total_offset_received += s->largest_offset_received();
}
return total_offset_received;
}
diff --git a/iocore/net/quic/test/test_QUICStreamManager.cc b/iocore/net/quic/test/test_QUICStreamManager.cc
index 9f01716..5f21f27 100644
--- a/iocore/net/quic/test/test_QUICStreamManager.cc
+++ b/iocore/net/quic/test/test_QUICStreamManager.cc
@@ -120,11 +120,6 @@ TEST_CASE("QUICStreamManager_total_offset_received", "[quic]")
CHECK(sm.stream_count() == 2);
CHECK(sm.total_offset_received() == 0);
- // Stream 0 shoud be out of flow control
- std::shared_ptr<QUICFrame> stream_frame_0 = QUICFrameFactory::create_stream_frame(data, 1024, 0, 0);
- sm.handle_frame(level, stream_frame_0);
- CHECK(sm.total_offset_received() == 0);
-
// total_offset should be a integer in unit of 1024 octets
std::shared_ptr<QUICFrame> stream_frame_1 = QUICFrameFactory::create_stream_frame(data, 1024, 1, 0);
sm.handle_frame(level, stream_frame_1);
[trafficserver] 02/03: Fix sending generated STREAM frame
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 45dd5aecb93d3a6d809a2ed0ae3f6e7badb0bbec
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Aug 27 15:34:12 2018 +0900
Fix sending generated STREAM frame
---
iocore/net/QUICNetVConnection.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index af40685..a44f136 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -1260,9 +1260,6 @@ QUICNetVConnection::_packetize_frames(QUICEncryptionLevel level, uint64_t max_pa
frame = this->_stream_manager->generate_frame(level, this->_remote_flow_controller->credit(), max_frame_size);
while (frame) {
++frame_count;
- if (++this->_stream_frames_sent % MAX_CONSECUTIVE_STREAMS == 0) {
- break;
- }
if (frame->type() == QUICFrameType::STREAM) {
int ret = this->_remote_flow_controller->update(this->_stream_manager->total_offset_sent());
QUICFCDebug("[REMOTE] %" PRIu64 "/%" PRIu64, this->_remote_flow_controller->current_offset(),
@@ -1271,6 +1268,10 @@ QUICNetVConnection::_packetize_frames(QUICEncryptionLevel level, uint64_t max_pa
}
this->_store_frame(buf, len, max_frame_size, std::move(frame));
+ if (++this->_stream_frames_sent % MAX_CONSECUTIVE_STREAMS == 0) {
+ break;
+ }
+
frame = this->_stream_manager->generate_frame(level, this->_remote_flow_controller->credit(), max_frame_size);
}