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

Limit fragmentation in write_vectored #1640

Merged
merged 3 commits into from
Feb 16, 2024
Merged

Commits on Feb 16, 2024

  1. Split BorrowedPlainMessage in inbound and outbound types

    Signed-off-by: Eloi DEMOLIS <eloi.demolis@clever-cloud.com>
    Wonshtrum committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    c15ec06 View commit details
    Browse the repository at this point in the history
  2. Create type OutboundChunks for OutboundMessage

    The ConnectionCommon<T>::write_vectored was implemented by processing
    each chunk, fragmenting them and wrapping each fragment in a
    OutboundMessage before encrypting and sending it as separate TLS frames.
    For very fragmented payloads this generates a lot of very small payloads
    with most of the data being TLS headers.
    
    OutboundChunks can contain an arbitrary amount of fragmented chunks.
    This allows write_vectored to process all its chunks at once,
    fragmenting it in place if needed and wrapping it in a OutboundMessage.
    All the chunks are merged in a contiguous vector (taking atvantage of an
    already existent copy) before being encrypted and sent as a single TLS
    frame.
    
    Signed-off-by: Eloi DEMOLIS <eloi.demolis@clever-cloud.com>
    Co-Authored-By: Emmanuel Bosquet <bjokac@gmail.com>
    Wonshtrum and Keksoj committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    2a22106 View commit details
    Browse the repository at this point in the history
  3. Move is_valid_ccs as a method of InboundMessage

    Signed-off-by: Eloi DEMOLIS <eloi.demolis@clever-cloud.com>
    Wonshtrum committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    71746d6 View commit details
    Browse the repository at this point in the history