| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
| |
Since we no longer have an outbound queue for each hop, and instead
return an error here if there is insufficient circuit window to send a
message, there's no need to pre-check whether we have sufficient window.
If there's insufficient circuit window, we'll still return an error slightly
later, after failing to take from the circuit window.
|
| | |
|
| |\
| |
| |
| |
| | |
StreamPollSet: remove redundant type parameter V
See merge request tpo/core/arti!2334
|
| | |
| |
| |
| |
| | |
This was required to be the same type as `S::Item`. We can just use
`S::Item` directly.
|
| |/
|
|
|
|
|
|
|
|
|
| |
This was written for use in StreamMap, with an eye towards potentially
reusing it elsewhere.
We no longer use it in StreamMap, so it's currently unused.
Probably best to go ahead and remove it now and resurrect it if we
decide we want it later than to maintain dead code (or to make it more
widely available without more concrete use-cases).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bullied by clippy. I'm on the fence whether this is actually an
improvement, or whether I should add an exception.
```
error: consider using `Option<T>` instead of `Option<Option<T>>` or a custom enum if you need to distinguish all 3 cases
--> crates/tor-proto/src/util/stream_poll_set.rs:106:56
|
106 | pub fn remove(&mut self, key: &K) -> Option<(K, P, Option<Option<V>>, S)> {
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_option
= note: `-D clippy::option-option` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::option_option)]`
```
|
| |
|
|
|
|
| |
This simplifies the bookkeeping a bit, and clears a path towards
updating the Streams in our StreamPollSet to directly respect flow
control.
|
| |
|
|
|
|
| |
This temporarily results in *more* bookkeeping, but is a step towards
putting the mpsc receivers back into `OpenStreamEnt`, and putting
the whole `OpenStreamEnt`s into the `StreamPollSet`.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
We can actually return references here instead of `impl Deref`,
simplifying this code a bit and follow-on code to use this in
StreamPollSet.
|
| |
|
|
|
|
|
|
|
| |
Primarily I wanted to exercise the code path that we get a spurious
wakeup due to a future that was removed from the map later becoming
ready.
I also ended up merging ReadyFut and PendingFut into a more flexible
ValueFut to make this a little nicer.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of wrapping `FuturesUnordered`, which doesn't support efficient
access to its internal futures, keep the futures themselves in our own
HashMap, and use a custom Waker to be notified which futures are ready
to be polled.
*Almost* a pure refactor in this step - the implementation now requires
that keys are `Send + Sync + 'static` so that we can put them inside an
`Arc` and send them over a channel.
|
| |
|
|
| |
Fixes #1513
|
| |
|
|
| |
For debugging #1513
|
| |
|
|
|
|
|
| |
We no longer need this. StreamMap now supports handling only one
outgoing message at a time while ensuring no streams starve, so we no
longer ever pull messages out of the map when we're not actually ready
to send them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Refactors `StreamMap` to use `StreamPollSet` to manage its receivers
for mpsc streams.
* Extends `StreamMap` to support iterating only over streams that have a
pending outgoing message, and in round-robin order.
* Updates `circuit::reactor::Reactor` to use this functionality. It now
iterates only over streams that have a ready outgoing message, and
only actually "pops" a message that is ready to be sent.
This mildly simplifies the circuit reactor, but more importantly clears
the way to:
* Remove the "outbound queue" of messages that were pulled from stream
channels but that we couldn't send yet due to congestion control.
* Support opportunistic packing when preparing to send a relay message.
(proposal 340).
* Refactor the circuit reactor's `run_once` into futures that we can
`select!` over.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
UnverifiedChannel: Clarify check's peer_cert
See merge request tpo/core/arti!2260
|
| | |
| |
| |
| |
| |
| |
| | |
This commit clarifies the documentation of the `peer_cert` parameter in
the `UnverifiedChannel::check` function, in order to reflect that it
represents the certificate presented during the ServerHello in the TLS
handshake and not in the in-protocol CERTS cell.
|
| |/
|
|
|
|
|
|
|
| |
This commit fixes a bug in the `ClientCirc::extend_ntor` function, which
currently returns a `Error::MissingId(Ed25519)` in the case that no RSA
identity has been found in the accompanying channel target.
This behavior is obviously wrong, because a missing RSA identity should
yield a `Error::MissingId(Rsa)`.
|
| | |
|
| |
|
|
|
|
|
| |
I'm not sure how to resolve these. See #1467.
We ought to fix them before they propagate to +stable, particularly
since after !2242 they'll break CI.
|
| |\
| |
| |
| |
| | |
Fix two TODO ticket numbers
See merge request tpo/core/arti!2224
|
| | |
| |
| |
| |
| | |
I seem to have mistyped this ticket number. We meant #1397
aka "Circuit reactor isn't great", not some release ticket.
|
| |/ |
|
| |\
| |
| |
| |
| | |
RFC: Provide and use SometimesUnboundedSender in circuit reactor
See merge request tpo/core/arti!2172
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
If only I'd used a macro for these, but that's not entirely
straightforward.
|
| | | |
|
| | | |
|
| | | |
|
| |\|
| |
| |
| |
| | |
Tidy up the ChannelSender::poll_ready inherent method
See merge request tpo/core/arti!2171
|
| | | |
|
| | |
| |
| |
| | |
This is where it belongs.
|
| | |
| |
| |
| |
| |
| |
| | |
This makes this available for any Sink + Unpin. Which we want because
we're about to wrap our ChannelSender in a Sink wrapper.
It's in the wrong place now; we'll move it in a moment.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This would otherwise shadow the poll_ready method, which is
confusing.
Also this paves the way for making it available for any
Sink + Unpin.
Improve the docs somewhat to explain what this thing actually is.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
I think this error was in fact always Error::CircuitClosed because it
came from ChannelClosed.into(). Anyway, we shouldn't squash it.
Now this function has semantics identical to Sink::poll_ready, just a
slightly different signature.
|