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

refactor(client): use process_output and process_multiple_input #1794

Merged
merged 3 commits into from
Apr 9, 2024

Commits on Apr 7, 2024

  1. refactor(client): use process_output and process_multiple_input

    `neqo_transport::Connection` offers 4 process methods:
    
    - `process`
    - `process_output`
    - `process_input`
    - `process_multiple_input`
    
    Where `process` is a wrapper around `process_input` and `process_output` calling
    both in sequence.
    
    https://github.com/mozilla/neqo/blob/5dfe106669ccb695187511305c21b8e8a8775e91/neqo-transport/src/connection/mod.rs#L1099-L1107
    
    Where `process_input` delegates to `process_multiple_input`.
    
    https://github.com/mozilla/neqo/blob/5dfe106669ccb695187511305c21b8e8a8775e91/neqo-transport/src/connection/mod.rs#L979-L1000
    
    Previously `neqo-client` would use `process` only. Thus continuously
    interleaving output and input. Say `neqo-client` would have multiple datagrams
    buffered through a GRO read, it could potentially have to do a write in between
    each `process` calls, as each call to `process` with an input datagram might
    return an output datagram to be written.
    
    With this commit `neqo-client` uses `process_output` and `process_multiple_input`
    directly, thus reducing interleaving on batch reads (GRO and in the future
    recvmmsg) and in the future batch writes (GSO and sendmmsg).
    
    By using `process_multiple_input` instead of `process` or `process_input`,
    auxiliarry logic, like `self.cleanup_closed_streams` only has to run per input
    datagram batch, and not for each input datagram.
    
    Extracted from mozilla#1741.
    mxinden committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    e32cf8b View commit details
    Browse the repository at this point in the history
  2. process_output before handle

    mxinden committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    d09357a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    431885a View commit details
    Browse the repository at this point in the history