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

Add TOS and TTL information to Datagrams #1568

Merged
merged 7 commits into from
Jan 22, 2024

Conversation

larseggert
Copy link
Collaborator

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.

@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2024

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (a334be2) 87.60% compared to head (d5dead7) 87.59%.
Report is 1 commits behind head on main.

Files Patch % Lines
neqo-interop/src/main.rs 0.00% 21 Missing ⚠️
neqo-client/src/main.rs 0.00% 9 Missing ⚠️
neqo-server/src/main.rs 0.00% 7 Missing ⚠️
neqo-common/src/tos.rs 98.52% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@martinthomson martinthomson left a 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).

neqo-common/src/datagram.rs Outdated Show resolved Hide resolved
neqo-common/src/datagram.rs Outdated Show resolved Hide resolved
@larseggert
Copy link
Collaborator Author

@martinthomson does the current version of this PR implement what you suggested?

Copy link
Member

@martinthomson martinthomson left a 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.

neqo-common/src/datagram.rs Outdated Show resolved Hide resolved
neqo-common/src/datagram.rs Outdated Show resolved Hide resolved
neqo-common/src/datagram.rs Outdated Show resolved Hide resolved
neqo-common/src/datagram.rs Show resolved Hide resolved
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.
@larseggert larseggert merged commit fb32a04 into mozilla:main Jan 22, 2024
9 checks passed
@larseggert larseggert deleted the feat-ecn-plumbing branch January 22, 2024 15:13
mxinden added a commit to mxinden/neqo that referenced this pull request Jun 25, 2024
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).
mxinden added a commit to mxinden/neqo that referenced this pull request Jun 25, 2024
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).
github-merge-queue bot pushed a commit that referenced this pull request Jun 26, 2024
#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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants