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/01/30 03:27:45 UTC
[trafficserver] branch quic-latest updated: [QUIC Client] Load
params from records.config
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
The following commit(s) were added to refs/heads/quic-latest by this push:
new 4e7658b [QUIC Client] Load params from records.config
4e7658b is described below
commit 4e7658ba62614bc982362820a06c69f7d0675862
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jan 30 12:27:27 2018 +0900
[QUIC Client] Load params from records.config
---
cmd/traffic_quic/traffic_quic.cc | 5 +++++
iocore/net/QUICNetVConnection.cc | 7 +++++--
iocore/net/quic/QUICConfig.cc | 2 ++
iocore/net/quic/QUICConfig.h | 13 +++++++------
mgmt/RecordsConfig.cc | 10 +++++++++-
5 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/cmd/traffic_quic/traffic_quic.cc b/cmd/traffic_quic/traffic_quic.cc
index f153e8f..5e48349 100644
--- a/cmd/traffic_quic/traffic_quic.cc
+++ b/cmd/traffic_quic/traffic_quic.cc
@@ -26,6 +26,8 @@
#include "ts/I_Layout.h"
#include "ts/I_Version.h"
+#include "RecordsConfig.h"
+
#include "diags.h"
#include "quic_client.h"
@@ -65,6 +67,9 @@ main(int argc, const char **argv)
init_diags(debug_tags, nullptr);
RecProcessInit(RECM_STAND_ALONE);
+ LibRecordsConfigInit();
+
+ Debug("quic_client", "Load configs from %s", RecConfigReadConfigDir().c_str());
Thread *main_thread = new EThread;
main_thread->set_specific();
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 7af2255..3967513 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -70,8 +70,11 @@ QUICNetVConnection::init(QUICConnectionId original_cid, UDPConnection *udp_con,
this->_packet_handler = packet_handler;
this->_original_quic_connection_id = original_cid;
this->_quic_connection_id.randomize();
- this->_ctable = ctable;
- this->_ctable->insert(this->_quic_connection_id, this);
+ // PacketHandler for out going connection doesn't have connection table
+ if (ctable) {
+ this->_ctable = ctable;
+ this->_ctable->insert(this->_quic_connection_id, this);
+ }
QUICConDebug("Connection ID %" PRIx64 " has been changed to %" PRIx64, static_cast<uint64_t>(this->_original_quic_connection_id),
static_cast<uint64_t>(this->_quic_connection_id));
}
diff --git a/iocore/net/quic/QUICConfig.cc b/iocore/net/quic/QUICConfig.cc
index 61e7411..a3ff6ec 100644
--- a/iocore/net/quic/QUICConfig.cc
+++ b/iocore/net/quic/QUICConfig.cc
@@ -35,6 +35,8 @@ QUICConfigParams::initialize()
{
REC_EstablishStaticConfigInt32U(this->_no_activity_timeout_in, "proxy.config.quic.no_activity_timeout_in");
REC_EstablishStaticConfigInt32U(this->_no_activity_timeout_out, "proxy.config.quic.no_activity_timeout_out");
+ REC_EstablishStaticConfigInt32U(this->_initial_max_data, "proxy.config.quic.initial_max_data");
+ REC_EstablishStaticConfigInt32U(this->_initial_max_stream_data, "proxy.config.quic.initial_max_stream_data");
REC_EstablishStaticConfigInt32U(this->_server_id, "proxy.config.quic.server_id");
}
diff --git a/iocore/net/quic/QUICConfig.h b/iocore/net/quic/QUICConfig.h
index c4525a1..0371774 100644
--- a/iocore/net/quic/QUICConfig.h
+++ b/iocore/net/quic/QUICConfig.h
@@ -41,16 +41,17 @@ public:
uint32_t server_id() const;
private:
- // FIXME Fill appropriate values
- uint32_t _no_activity_timeout_in = 30;
- uint32_t _no_activity_timeout_out = 30;
- uint32_t _initial_max_data = 131072;
- uint32_t _initial_max_stream_data = 2048;
+ // FIXME Fill appropriate default values in RecordsConfig.cc
+ uint32_t _no_activity_timeout_in = 0;
+ uint32_t _no_activity_timeout_out = 0;
+ uint32_t _initial_max_data = 0;
+ uint32_t _initial_max_stream_data = 0;
+ uint32_t _server_id = 0;
+
uint32_t _initial_max_stream_id_bidi_in = 100;
uint32_t _initial_max_stream_id_bidi_out = 101;
uint32_t _initial_max_stream_id_uni_in = 102;
uint32_t _initial_max_stream_id_uni_out = 103;
- uint32_t _server_id = 0;
};
class QUICConfig
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 11a062a..8cf3fee 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -201,7 +201,7 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.diags.debug.tags", RECD_STRING, "http|dns", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.diags.debug.client_ip", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
+ {RECT_CONFIG, "proxy.config.diags.debug.client_ip", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.diags.action.enabled", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
@@ -1316,6 +1316,14 @@ static const RecordElement RecordsConfig[] =
//############
{RECT_CONFIG, "proxy.config.quic.no_activity_timeout_in", RECD_INT, "30", RECU_DYNAMIC, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL}
,
+ {RECT_CONFIG, "proxy.config.quic.no_activity_timeout_out", RECD_INT, "30", RECU_DYNAMIC, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL}
+ ,
+ {RECT_CONFIG, "proxy.config.quic.initial_max_data", RECD_INT, "131072", RECU_DYNAMIC, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL}
+ ,
+ {RECT_CONFIG, "proxy.config.quic.initial_max_stream_data", RECD_INT, "2048", RECU_DYNAMIC, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL}
+ ,
+ {RECT_CONFIG, "proxy.config.quic.server_id", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL}
+ ,
//# Add LOCAL Records Here
{RECT_LOCAL, "proxy.local.incoming_ip_to_bind", RECD_STRING, nullptr, RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
--
To stop receiving notification emails like this one, please contact
masaori@apache.org.