Skip to content
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

Enabling multirecord send persists across configs #4715

Open
goatgoose opened this issue Aug 19, 2024 · 0 comments
Open

Enabling multirecord send persists across configs #4715

goatgoose opened this issue Aug 19, 2024 · 0 comments

Comments

@goatgoose
Copy link
Contributor

Problem:

Multirecord send allows connections to buffer multiple records before sending them, which reduces system write calls. Multirecord send is enabled by adjusting the config's send buffer size with s2n_config_set_send_buffer_size().

Adjusting the config's send buffer size sets the connection's multirecord_send flag in s2n_connection_set_config(). This flag is never unset, even if a subsequent config with an unmodified send buffer size is set on the connection.

This behavior may be unexpected, since the multirecord send behavior appears to be configured for a config, but is actually configured on the connection itself. It seems more correct to directly associate the multirecord send behavior with the state of the config's send buffer size.

Solution:

Either:

  1. Reset conn->multirecord_send to false in s2n_connection_set_config() if the new config's send buffer size wasn't overridden.
  2. Directly use the send_buffer_size_override config flag to enable the multirecord send behavior, rather than tracking it separately on the connection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants