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

TCP CCAs in Rust #1062

Draft
wants to merge 13 commits into
base: staging/rust-net
Choose a base branch
from
Draft

Commits on Feb 19, 2024

  1. net/tcp: add logging to BIC

    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    a275bc8 View commit details
    Browse the repository at this point in the history
  2. scripts/gen_rust_analyzer: search modules in net/

    When generating the `rust-project.json`, also search for modules in the
    `net/` folder.
    
    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    12e579b View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2024

  1. rust: introduce InPlaceModule

    This allows modules to be initialised in-place in pinned memory, which
    enables the usage of pinned types (e.g., mutexes, spinlocks, driver
    registrations, etc.) in modules without any extra allocations.
    
    Drivers that don't need this may continue to implement `Module` without
    any changes.
    
    Signed-off-by: Wedson Almeida Filho <[email protected]>
    [[email protected]: remove feature return_position_impl_trait_in_trait
    as it is now stabilised]
    [[email protected]: remove `Send` trait bound on `Module` and
    `InPlaceModule`]
    wedsonaf authored and Valentin Obst committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    bd2d900 View commit details
    Browse the repository at this point in the history
  2. rust: init: introduce Opaque::try_ffi_init

    We'll need it, for example, when calling `register_filesystem` to
    initialise a file system registration.
    
    Signed-off-by: Wedson Almeida Filho <[email protected]>
    wedsonaf authored and Valentin Obst committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    a13e700 View commit details
    Browse the repository at this point in the history
  3. rust/kernel: add time primitives for net/tcp

    In net/tcp time values are usually 32bit wide unsigned integers, and
    either in units of jiffies, microseconds or milliseconds. Add types,
    constants, and functions to work with 32bit time values.
    
    This is, for example, used in the CUBIC and BIC CCAs.
    
    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    08fc8c3 View commit details
    Browse the repository at this point in the history
  4. rust/kernel: add field_size macro

    Add a macro to determine the size of a structure field at compile time.
    This is used by the CCA abstractions to ensure that the private data of
    every CCA will fit into the space that the kernel provides for it.
    
    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    a01311b View commit details
    Browse the repository at this point in the history
  5. EDITME: cover title for tcp-cca-rfc

    # Describe the purpose of this series. The information you put here
    # will be used by the project maintainer to make a decision whether
    # your patches should be reviewed, and in what priority order. Please be
    # very detailed and link to any relevant discussions or sites that the
    # maintainer can review to better understand your proposed changes. If you
    # only have a single patch in your series, the contents of the cover
    # letter will be appended to the "under-the-cut" portion of the patch.
    
    # Lines starting with # will be removed from the cover letter. You can
    # use them to add notes or reminders to yourself. If you want to use
    # markdown headers in your cover letter, start the line with ">#".
    
    # You can add trailers to the cover letter. Any email addresses found in
    # these trailers will be added to the addresses specified/generated
    # during the b4 send stage. You can also run "b4 prep --auto-to-cc" to
    # auto-populate the To: and Cc: trailers based on the code being
    # modified.
    
    Signed-off-by: Valentin Obst <[email protected]>
    
    --- b4-submit-tracking ---
    # This section is used internally by b4 prep for tracking purposes.
    {
      "series": {
        "revision": 1,
        "change-id": "20240301-tcp-cca-rfc-1a0fbcaa533c",
        "prefixes": []
      }
    }
    Valentin Obst committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    5c84c6c View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2024

  1. rust/net: add sock, tcp_sock and icsk wrappers

    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    ded5104 View commit details
    Browse the repository at this point in the history
  2. rust/net: add CCA abstractions

    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    f410fa0 View commit details
    Browse the repository at this point in the history
  3. samples/rust: add minimal CCA

    Add an example that uses the `module_cca` macro and the `Algorithm`
    trait to implement a minimal CCA.
    
    IMPORTANT: This CCA is not compliant with the relevant RFCs and must not
    be used outside of test environments.
    
    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    19a8136 View commit details
    Browse the repository at this point in the history
  4. net/tcp: add Rust implementation of BIC

    Reimplement the Binary Increase Congestion (BIC) control algorithm in
    Rust. BIC is one of the smallest CCAs in the kernel and this mainly
    serves as a minimal example for a real-world algorithm.
    
    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    29c6b40 View commit details
    Browse the repository at this point in the history
  5. rust/net: add implementation of HyStart

    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    67c08f7 View commit details
    Browse the repository at this point in the history
  6. net/tcp: add Rust implementation of CUBIC

    CUBIC is the default CCA since 2.6.18.
    
    Missing features compared to the C implementation:
    - configuration via module parameters,
    - exporting callbacks to BPF programs as kfuncs.
    
    Changes compared to the C implementation:
    - uses only SI units for time, i.e., no jiffies and `BICTCP_HZ`,
    
    Signed-off-by: Valentin Obst <[email protected]>
    Valentin Obst committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    2253d8e View commit details
    Browse the repository at this point in the history