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 UdpMuxNewAddr to be lock-less #1

Merged
merged 24 commits into from
Aug 31, 2022

Commits on Aug 2, 2022

  1. Dirty PoC for lock-less UdpMuxNewAddr

    The general idea is this:
    
    We use `flume` channels between the actual `UdpMuxNewAddr` instance
    and a set of "handles", one per async-trait that we need to satisfy.
    
    There is only one instance of `UdpMuxNewAddr`, meaning we can access
    it via `&mut self` and drop all locks within it.
    
    In the poll function, we can then decide, which events to prioritise
    over others. Most importantly, all channels between handles and the
    actual instance are "rendezvous channels", meaning, sending will block
    until we actually read the item out of the channel. This allows us
    to enforce backpressure from the poll function all the way to all
    handles and into the task that is interacting with the handle.
    thomaseizinger committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    9b298e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5483e7 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Configuration menu
    Copy the full SHA
    a137a07 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f522bb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9d9c9a4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    54444b7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ce44836 View commit details
    Browse the repository at this point in the history
  6. Add TODO

    thomaseizinger committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    c111c46 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2022

  1. Configuration menu
    Copy the full SHA
    ac14b9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3c214cb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eb35b18 View commit details
    Browse the repository at this point in the history
  4. Fix clippy warnings

    thomaseizinger committed Aug 18, 2022
    Configuration menu
    Copy the full SHA
    744ad62 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eb976f2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8a77b6e View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2022

  1. Configuration menu
    Copy the full SHA
    6d49c5a View commit details
    Browse the repository at this point in the history
  2. Never have more than one write future

    This is to ensure backpressure. To not loose drop any packets, we
    only read from the socket in case we are not currently writing a packet.
    thomaseizinger committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    521da48 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    676d50d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9a32e4f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    64f8021 View commit details
    Browse the repository at this point in the history
  6. Remove unused import

    thomaseizinger committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    1d8094b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cc66761 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6bce388 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2022

  1. Simplify send_buffer handling

    Instead of buffering multiple items, we only ever buffer one. To
    work off this queue as quickly as possible, we put it at the top
    of the loop which allows us to reduce some code duplication by
    writing directly to the buffer in case we popped an item off the
    queue and going back to the start of the loop which will trigger
    a different code branch.
    thomaseizinger committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    16fb8e4 View commit details
    Browse the repository at this point in the history
  2. Cargo fmt

    thomaseizinger committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    211baae View commit details
    Browse the repository at this point in the history