-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
mobile: Add an option to set the UDP socket send and receive buffer sizes #35190
Conversation
/retest |
2 similar comments
/retest |
/retest |
b1b56de
to
2d5bf8e
Compare
/retest |
87c8057
to
a084d8d
Compare
/retest |
1 similar comment
/retest |
a0b0820
to
5b5f1c1
Compare
Signed-off-by: Fredy Wijaya <[email protected]>
/retest |
/assign @alyssawilk |
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.
nice!
udp_snd_buf_sock_opt->set_name(SO_SNDBUF); | ||
udp_snd_buf_sock_opt->set_level(SOL_SOCKET); | ||
udp_snd_buf_sock_opt->set_int_value(udp_socket_send_buffer_size_); | ||
udp_snd_buf_sock_opt->mutable_type()->mutable_datagram(); |
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.
Mind adding a comment
// Make sure this option is only applied to UDP sockets and not TCP
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.
Done.
mobile/library/cc/engine_builder.cc
Outdated
@@ -734,6 +739,15 @@ std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap> EngineBuilder::generate | |||
rcv_buf_sock_opt->set_int_value(socket_receive_buffer_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.
change this to datagram only?
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.
Initially I wanted to do it in a separate PR, but the change is small enough that I can do it in this PR. Done.
Signed-off-by: Fredy Wijaya <[email protected]>
…izes (envoyproxy#35190) This PR adds an option in the `EngineBuilder` to set the UDP socket send buffer size. By default it will use the same value as the one set in Chromium: https://source.chromium.org/chromium/chromium/src/+/main:net/quic/quic_session_pool.cc;l=790-793;drc=7f04a8e033c23dede6beae129cd212e6d4473d72 This PR also updates the code to only apply the default receive buffer size to UDP and not TCP given that the code in https://source.chromium.org/chromium/chromium/src/+/main:net/quic/quic_session_pool.cc;l=766;drc=7f04a8e033c23dede6beae129cd212e6d4473d72 only applies the socket option to UDP only. Risk Level: low Testing: unit tests Docs Changes: n/a Release Notes: n/a Platform Specific Features: mobile --------- Signed-off-by: Fredy Wijaya <[email protected]> Signed-off-by: Martin Duke <[email protected]>
…izes (envoyproxy#35190) This PR adds an option in the `EngineBuilder` to set the UDP socket send buffer size. By default it will use the same value as the one set in Chromium: https://source.chromium.org/chromium/chromium/src/+/main:net/quic/quic_session_pool.cc;l=790-793;drc=7f04a8e033c23dede6beae129cd212e6d4473d72 This PR also updates the code to only apply the default receive buffer size to UDP and not TCP given that the code in https://source.chromium.org/chromium/chromium/src/+/main:net/quic/quic_session_pool.cc;l=766;drc=7f04a8e033c23dede6beae129cd212e6d4473d72 only applies the socket option to UDP only. Risk Level: low Testing: unit tests Docs Changes: n/a Release Notes: n/a Platform Specific Features: mobile --------- Signed-off-by: Fredy Wijaya <[email protected]> Signed-off-by: asingh-g <[email protected]>
This PR adds an option in the
EngineBuilder
to set the UDP socket send buffer size. By default it will use the same value as the one set in Chromium: https://source.chromium.org/chromium/chromium/src/+/main:net/quic/quic_session_pool.cc;l=790-793;drc=7f04a8e033c23dede6beae129cd212e6d4473d72This PR also updates the code to only apply the default receive buffer size to UDP and not TCP given that the code in https://source.chromium.org/chromium/chromium/src/+/main:net/quic/quic_session_pool.cc;l=766;drc=7f04a8e033c23dede6beae129cd212e6d4473d72 only applies the socket option to UDP only.
Risk Level: low
Testing: unit tests
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: mobile