-
Notifications
You must be signed in to change notification settings - Fork 845
QUIC: Add support to configure UDP max payload limit. #9486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
[approve ci autest] |
|
I just found that
|
Ok, I saw that on the spcecs, So,
|
|
Ah, Quiche API uses similar names for send and recv, but only the one for recv is a transport parameter. We should probably have the both recv and send under We could also have |
grand, will update this PR then. |
f9fbf4d to
f300ba0
Compare
|
[approve ci autest] |
|
|
||
| .. 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_out INT 65527 | ||
| Specified the maximum outgoing UDP payload size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
| 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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in or out?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/records/RecordsConfig.cc
Outdated
| , | ||
| {RECT_CONFIG, "proxy.config.udp.enable_gso", RECD_INT, "1", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL} | ||
| , | ||
| {RECT_CONFIG, "proxy.config.udp.max_recv_payload_size", RECD_INT, "65527", RECU_DYNAMIC, RR_NULL, RECC_NULL, "^[0-9]+$", RECA_NULL} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are going to have proxy.config.quic.max_recv_udp_payload_size_in|out, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, my bad, made a mess with names and all that stuff. Will fix.
|
Made a mess with my branches, this is missing the actual records. Will fix. Sorry again guys. Fixed |
f300ba0 to
37c2788
Compare
maskit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* commit 'c54a2e2b77151869ff014fbdc4c82cec0afcbb8c': (37 commits) Slight performance improvements before calling APIHooks::clear (apache#9480) libswoc: Update to 1.4.5 (apache#9522) CryptoContext: Clean up to avoid compiler problem. (apache#9521) Add TLSCertSwitchSupport (apache#9322) Add clang-format-tests to clang-format target (apache#9456) Adds the AR env variable to config.nice (apache#9515) Fix .asf.yaml (apache#9519) Hugepage config cleanup (apache#9479) Separate io_uring into a separate library. AIO in io_uring mode uses new io_uring lib. (apache#9462) Avoid memory allocation in CryptoHash (apache#9474) UnitParser: add unit parser support. (apache#9485) autest - Minor fix on the verifier_client test ext to allow setting only the http3 ports. (apache#9517) Remove support for port event polling (apache#9476) QUIC: Add support to configure UDP max payload limit. (apache#9486) Reduce the size of the APIHooks, eliminating enum gap (apache#9509) Add support for CMCD-Request header nor field to prefetch plugin (apache#9232) Eliminates padding from some common structs (apache#9481) Enable external file loading for sni.yaml. (apache#9501) Remove inactive include of IpMapConf.h (apache#9512) Cleanup: Remove RecModeT from the code. (apache#9487) ...
This commit also makes this configuration available for the quiche quic implementation.