-
Notifications
You must be signed in to change notification settings - Fork 123
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
Being refactored: ECN additions #1495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it that this is groundwork for ECN
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1495 +/- ##
==========================================
- Coverage 86.52% 86.49% -0.03%
==========================================
Files 117 118 +1
Lines 38229 38531 +302
==========================================
+ Hits 33079 33329 +250
- Misses 5150 5202 +52 ☔ View full report in Codecov by Sentry. |
c0c6850
to
fb5434d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've a question for you and some suggestions, but I trust you to resolve those from here (and I don't want to block you while I'm on leave).
@@ -710,7 +711,9 @@ impl ServersRunner { | |||
match self.server.process(dgram, self.args.now()) { | |||
Output::Datagram(dgram) => { | |||
let socket = self.find_socket(dgram.source()); | |||
emit_packet(socket, dgram); | |||
if let Err(e) = emit_datagram(socket, &dgram) { | |||
eprintln!("UDP write error: {}", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to open an issue to track EAGAIN handling in these?
@martinthomson could you re-review? Made a bunch of changes that make things work on all platforms again. |
Blocked until nix-rust/nix#2203 has shipped. |
4ce889b
to
f766192
Compare
50058c0
to
cf3e00b
Compare
nix = { git = "https://github.com/larseggert/nix.git", branch = "feat-tos", features = [ | ||
"socket", | ||
"net", | ||
"uio", | ||
], optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's continue to block on this being integrated upstream. Worst case, we can take up your fork, but if this can be upstreamed, that's a lot easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in progress. Depends on another PR upstream.
neqo-common/src/socket.rs
Outdated
*tos = 0xff; | ||
*ttl = 0xff; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 or 0xff? Consistency?
neqo-common/src/socket.rs
Outdated
} | ||
|
||
#[test] | ||
fn test_bind_v4() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a real aversion to tests called test_whatever. Keep in mind that this will be called ...::test::test_bind_v4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
@@ -412,7 +412,7 @@ impl LossRecoverySpace { | |||
.sent_packets | |||
.iter_mut() | |||
// BTreeMap iterates in order of ascending PN | |||
.take_while(|(&k, _)| Some(k) < largest_acked) | |||
.take_while(|(&k, _)| largest_acked.is_none() || Some(k) < largest_acked) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sort of change really needs to be in a separate patch so that we can look at the recovery tests in more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I realized this is getting big. I will break it into individual chunks.
This part of the refactor of mozilla#1495. This doesn't include any ECN I/O or other logic, just adds the required fields to the datagram header.
This part of the refactor of mozilla#1495. This doesn't include any ECN I/O or other logic, just adds the required fields to the datagram header.
* Add TOS and TTL information to Datagrams This part of the refactor of #1495. This doesn't include any ECN I/O or other logic, just adds the required fields to the datagram header. * cargo fmt * Add test * Fix clippy * Add an IpTos type as suggested by @martinthomson. I might back this back out if it is not the direction we want to go in, pending further discussion. * Move IpTos things into their own source file * Make IpTos use a single byte
Most of the remaining bits from mozilla#1495 Depends on mozilla#1604
Crossposting mxinden#1 (review) here to ensure review on fork does not get lost. |
Most of the remaining bits from mozilla#1495 Depends on mozilla#1604
Nothing left in this PR that would be of interest. |
The remaining bits from mozilla#1495 The remaining todo item after this PR is to actually act on incoming CE marks, i.e., trigger a congestion control action. See mozilla#1689
* feat: Send and process ACK-ECN The remaining bits from #1495 The remaining todo item after this PR is to actually act on incoming CE marks, i.e., trigger a congestion control action. See #1689 * Modifier * Fix botched merge * Fix merge * Rework * Add more tests that hopefully cover all cases. * WIP * Tests passing * More tests * Minimize diff * ci(interop): run ecn test * Update neqo-transport/src/connection/tests/ecn.rs Co-authored-by: Max Inden <mail@max-inden.de> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/qlog.rs Co-authored-by: Max Inden <mail@max-inden.de> Signed-off-by: Lars Eggert <lars@eggert.org> * Fix qns * Reduce number of CONNECTION_CLOSE frames If this makes ngtcp2 happy, refactor into separate PR. * Update neqo-transport/src/ecn.rs Co-authored-by: Max Inden <mail@max-inden.de> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/ecn.rs Co-authored-by: Max Inden <mail@max-inden.de> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/ecn.rs Co-authored-by: Max Inden <mail@max-inden.de> Signed-off-by: Lars Eggert <lars@eggert.org> * Fixes * Update neqo-transport/src/connection/tests/ecn.rs Co-authored-by: Martin Thomson <mt@lowentropy.net> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/connection/tests/ecn.rs Co-authored-by: Martin Thomson <mt@lowentropy.net> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/connection/mod.rs Co-authored-by: Martin Thomson <mt@lowentropy.net> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/frame.rs Co-authored-by: Martin Thomson <mt@lowentropy.net> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/frame.rs Co-authored-by: Martin Thomson <mt@lowentropy.net> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/ecn.rs Co-authored-by: Martin Thomson <mt@lowentropy.net> Signed-off-by: Lars Eggert <lars@eggert.org> * Some fixups from code review * More code review fixups * Check whether migration happened as expected. Minor other tweaks. * Consolidate all the `nodata` tests --------- Signed-off-by: Lars Eggert <lars@eggert.org> Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Martin Thomson <mt@lowentropy.net>
* feat: Send and process ACK-ECN The remaining bits from #1495 The remaining todo item after this PR is to actually act on incoming CE marks, i.e., trigger a congestion control action. See #1689 * Modifier * Fix botched merge * Fix merge * Rework * Add more tests that hopefully cover all cases. * WIP * Tests passing * More tests * Minimize diff * ci(interop): run ecn test * Update neqo-transport/src/connection/tests/ecn.rs Co-authored-by: Max Inden <mail@max-inden.de> Signed-off-by: Lars Eggert <lars@eggert.org> * Update neqo-transport/src/qlog.rs Co-authored-by: Max Inden <mail@max-inden.de> Signed-off-by: Lars Eggert <lars@eggert.org> * Fix qns * Reduce number of CONNECTION_CLOSE frames If this makes ngtcp2 happy, refactor into separate PR. * feat(transport): pass ECN CE marks to CC Pass ECN CE marks received through FRAME_TYPE_ACK_ECN frames to the congestion controler. * Update ACK delay on ECN CE mark --------- Signed-off-by: Lars Eggert <lars@eggert.org> Co-authored-by: Lars Eggert <lars@eggert.org>
This PR is getting too large. I'm in the process of refactoring it into smaller chunks: