-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add TOS and TTL information to Datagrams #1568
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1568 +/- ##
==========================================
- Coverage 87.60% 87.59% -0.02%
==========================================
Files 117 118 +1
Lines 38333 38464 +131
==========================================
+ Hits 33583 33693 +110
- Misses 4750 4771 +21 ☔ View full report in Codecov by Sentry. |
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 is looking good.
I'm semi-serious about having a wrapper type for IpTos
. You have a case where you set a tos
argument to a value of the Ecn enum. But I think that you want a wrapper type (that trivially converts to u8
) that has simple functions for converting from IpTosEcn
and (IpTosDscp, IpTosEcn)
.
@martinthomson does the current version of this PR implement what you suggested? |
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.
As always, I have suggestions, but none of them should block landing should you need that.
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.
I might back this back out if it is not the direction we want to go in, pending further discussion.
ab61221
to
d5dead7
Compare
mozilla#1568 introduced TTL information to datagrams. On the input path it would take the ttl information, but not act on it. On the output path it would set only "the default TTL on many OSes". https://github.com/mozilla/neqo/blob/66504908e5fa070a8a5fa67d8b5a201d2c9a5cc5/neqo-transport/src/path.rs#L576 This commit removes the ttl information from `Datagram`, thus reverting a subset of mozilla#1568. This is partially motivated by mozilla#1920, introducing `quinn-udp` as the IO library of choice, which does not support reading and writing TTL. See also discussion in mozilla#1920 (comment).
mozilla#1568 introduced TTL information to datagrams. On the input path it would take the ttl information, but not act on it. On the output path it would set only "the default TTL on many OSes". https://github.com/mozilla/neqo/blob/66504908e5fa070a8a5fa67d8b5a201d2c9a5cc5/neqo-transport/src/path.rs#L576 This commit removes the ttl information from `Datagram`, thus reverting a subset of mozilla#1568. This is partially motivated by mozilla#1920, introducing `quinn-udp` as the IO library of choice, which does not support reading and writing TTL. See also discussion in mozilla#1920 (comment).
#1568 introduced TTL information to datagrams. On the input path it would take the ttl information, but not act on it. On the output path it would set only "the default TTL on many OSes". https://github.com/mozilla/neqo/blob/66504908e5fa070a8a5fa67d8b5a201d2c9a5cc5/neqo-transport/src/path.rs#L576 This commit removes the ttl information from `Datagram`, thus reverting a subset of #1568. This is partially motivated by #1920, introducing `quinn-udp` as the IO library of choice, which does not support reading and writing TTL. See also discussion in #1920 (comment).
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.