Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions doc/admin-guide/files/records.yaml.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4667,6 +4667,23 @@ removed in the future without prior notice.
that |TS| is willing to store. The value MUST be at least 2.
Transport Parameter.

.. ts:cv:: CONFIG proxy.config.quic.max_recv_udp_payload_size_in INT 65527

This value will be advertised as ``max_udp_payload_size`` Transport Parameter.

.. ts:cv:: CONFIG proxy.config.quic.max_recv_udp_payload_size_out INT 65527

This value will be advertised as ``max_udp_payload_size`` Transport Parameter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two configs with exactly the same description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they reference to the same transport parameter. I think this eventually will contain more details, or even a link to the current rfc definition.


.. ts:cv:: CONFIG proxy.config.quic.max_send_udp_payload_size_in INT 65527

Specified the maximum outgoing UDP payload size.

.. ts:cv:: CONFIG proxy.config.quic.max_send_udp_payload_size_out INT 65527

Specified the maximum outgoing UDP payload size.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.



UDP Configuration
=====================

Expand All @@ -4680,6 +4697,7 @@ UDP Configuration
Enables (``1``) or disables (``0``) UDP GSO. When enabled, |TS| tries to use UDP GSO,
and disables it automatically if it causes send errors.


Plug-in Configuration
=====================

Expand Down
4 changes: 2 additions & 2 deletions iocore/net/QUICNetProcessor_quiche.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ QUICNetProcessor::start(int, size_t stacksize)
}

quiche_config_set_max_idle_timeout(this->_quiche_config, params->no_activity_timeout_in());
quiche_config_set_max_recv_udp_payload_size(this->_quiche_config, 16384);
quiche_config_set_max_send_udp_payload_size(this->_quiche_config, 16384);
quiche_config_set_max_recv_udp_payload_size(this->_quiche_config, params->get_max_recv_udp_payload_size_in());
quiche_config_set_max_send_udp_payload_size(this->_quiche_config, params->get_max_send_udp_payload_size_in());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in or out?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a bit odd that the default value for these config variables is (about) double the previous hard-coded value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be the default for this transport parameter.

The default for this parameter is the maximum permitted UDP payload of 65527. Values below 1200 are invalid.well, being hardcoded before means nothing different

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hard-coded value means nothing. It could be 12000 or 32768 if I made the commit on a different day.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And _in is correct for the both here. It's for inbound connections. The _out will be used when we support H3 to origin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the names of the the Quiche API functions, it doesn't look like you can set different max packet sizes when the near end is the server versus the client.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although MTU always limits packet sizes on both direction, what these settings mean are:
recv: Tell the peer "Don't send me packets bigger than this size"
send: Think quietly "I'm going to send this size of packets at maximum if the peer allows"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I thought. But I don't see how Quiche is allowing us to configure those values differently depending on whether the near end is the client or the server. If we can't, we only need two new config variables, not four.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you mean different packet sizes for inbound connection and outbound connection? We'll need another quiche_config object for outbound connections. That is why we use _in settings here. We'll have similar code that use _out settings somewhere else in the future.

quiche_config_set_initial_max_data(this->_quiche_config, params->initial_max_data_in());
quiche_config_set_initial_max_stream_data_bidi_local(this->_quiche_config, params->initial_max_stream_data_bidi_local_in());
quiche_config_set_initial_max_stream_data_bidi_remote(this->_quiche_config, params->initial_max_stream_data_bidi_remote_in());
Expand Down
28 changes: 28 additions & 0 deletions iocore/net/quic/QUICConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ QUICConfigParams::initialize()
REC_EstablishStaticConfigInt32U(this->_active_cid_limit_in, "proxy.config.quic.active_cid_limit_in");
REC_EstablishStaticConfigInt32U(this->_active_cid_limit_out, "proxy.config.quic.active_cid_limit_out");
REC_EstablishStaticConfigInt32U(this->_disable_active_migration, "proxy.config.quic.disable_active_migration");
REC_EstablishStaticConfigInt32U(this->_max_recv_udp_payload_size_in, "proxy.config.quic.max_recv_udp_payload_size_in");
REC_EstablishStaticConfigInt32U(this->_max_recv_udp_payload_size_out, "proxy.config.quic.max_recv_udp_payload_size_out");
REC_EstablishStaticConfigInt32U(this->_max_send_udp_payload_size_in, "proxy.config.quic.max_send_udp_payload_size_in");
REC_EstablishStaticConfigInt32U(this->_max_send_udp_payload_size_out, "proxy.config.quic.max_send_udp_payload_size_out");

// Loss Detection
REC_EstablishStaticConfigInt32U(this->_ld_packet_threshold, "proxy.config.quic.loss_detection.packet_threshold");
Expand Down Expand Up @@ -366,6 +370,30 @@ QUICConfigParams::disable_active_migration() const
return this->_disable_active_migration;
}

uint32_t
QUICConfigParams::get_max_recv_udp_payload_size_in() const
{
return this->_max_recv_udp_payload_size_in;
}

uint32_t
QUICConfigParams::get_max_recv_udp_payload_size_out() const
{
return this->_max_recv_udp_payload_size_out;
}

uint32_t
QUICConfigParams::get_max_send_udp_payload_size_in() const
{
return this->_max_send_udp_payload_size_in;
}

uint32_t
QUICConfigParams::get_max_send_udp_payload_size_out() const
{
return this->_max_send_udp_payload_size_out;
}

const char *
QUICConfigParams::server_supported_groups() const
{
Expand Down
10 changes: 10 additions & 0 deletions iocore/net/quic/QUICConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ class QUICConfigParams : public ConfigInfo
uint8_t active_cid_limit_in() const;
uint8_t active_cid_limit_out() const;
bool disable_active_migration() const;
uint32_t get_max_recv_udp_payload_size_in() const;
uint32_t get_max_recv_udp_payload_size_out() const;

uint32_t get_max_send_udp_payload_size_in() const;
uint32_t get_max_send_udp_payload_size_out() const;

// Loss Detection
uint32_t ld_packet_threshold() const;
Expand Down Expand Up @@ -139,6 +144,11 @@ class QUICConfigParams : public ConfigInfo
uint32_t _active_cid_limit_in = 0;
uint32_t _active_cid_limit_out = 0;
uint32_t _disable_active_migration = 0;
uint32_t _max_recv_udp_payload_size_in = 0;
uint32_t _max_recv_udp_payload_size_out = 0;

uint32_t _max_send_udp_payload_size_in = 0;
uint32_t _max_send_udp_payload_size_out = 0;

// [draft-17 recovery] 6.4.1. Constants of interest
uint32_t _ld_packet_threshold = 3;
Expand Down
9 changes: 9 additions & 0 deletions src/records/RecordsConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,15 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.quic.disable_active_migration", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_STR, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.quic.max_recv_udp_payload_size_in", RECD_INT, "65527", RECU_DYNAMIC, RR_NULL, RECC_NULL, "^[0-9]+$", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.quic.max_recv_udp_payload_size_out", RECD_INT, "65527", RECU_DYNAMIC, RR_NULL, RECC_NULL, "^[0-9]+$", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.quic.max_send_udp_payload_size_in", RECD_INT, "65527", RECU_DYNAMIC, RR_NULL, RECC_NULL, "^[0-9]+$", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.quic.max_send_udp_payload_size_out", RECD_INT, "65527", RECU_DYNAMIC, RR_NULL, RECC_NULL, "^[0-9]+$", RECA_NULL}
,

// Constants of Loss Detection
{RECT_CONFIG, "proxy.config.quic.loss_detection.packet_threshold", RECD_INT, "3", RECU_DYNAMIC, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL}
,
Expand Down