-
Notifications
You must be signed in to change notification settings - Fork 128
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
feat(qlog): log version_information on server #1531
feat(qlog): log version_information on server #1531
Conversation
This commit adds support for the qlog [`version_information` QUIC event](https://quicwg.org/qlog/draft-ietf-quic-qlog-quic-events.html#name-version_information) on the server. Depends on cloudflare/quiche#1684 Meta issue: mozilla#528
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.
Following up on Martin's comment in #1505 (review):
For the server, look in
server.rs
forfn accept_connection(...)
.
Done in this pull request. Let me know if the direction is correct.
There shouldn't be a negotiated equivalent on the server
Do I understand correctly that you don't want to log the happy path, i.e. the case where version negotiation succeeds on the server? Fine by me.
For VN, you can make a call in
fn process_input(...)
right where it callsPacketBuilder::version_negotiation(...)
, which is where the Version Negotiation packet is sent.
Done in this pull request. Let me know if the direction is correct.
neqo-transport/src/server.rs
Outdated
|
||
crate::qlog::server_version_information_failed( | ||
&mut self.create_qlog_trace(&AttemptKey { | ||
remote_address: dgram.source(), |
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.
Note that remote_address
is not used by self.create_qlog_trace
. Want me to change the signature of self.create_qlog_trace
to only take the odcid
?
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.
That's worth doing. We might have needed an address once upon a time. Or maybe all the other instances where a trace was needed involved an address. Now that we have a case where we make a useless AttemptKey
, it seems worthwhile changing the signature to eliminate that extra work (and have the other call sites use AttemptKey::odcid()
.
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.
👍 Continuing discussion in #1531 (review).
…ion-information-server
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1531 +/- ##
==========================================
- Coverage 86.52% 86.49% -0.03%
==========================================
Files 117 117
Lines 38170 38264 +94
==========================================
+ Hits 33025 33096 +71
- Misses 5145 5168 +23 ☔ View full report in Codecov by Sentry. |
@martinthomson can you give this pull request a first review? Is this the direction you intended in #1505 (review)? |
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.
Once you get the refactoring sorted, I'll merge this. Sorry for missing it (I blame my vacation).
neqo-transport/src/server.rs
Outdated
|
||
crate::qlog::server_version_information_failed( | ||
&mut self.create_qlog_trace(&AttemptKey { | ||
remote_address: dgram.source(), |
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.
That's worth doing. We might have needed an address once upon a time. Or maybe all the other instances where a trace was needed involved an address. Now that we have a case where we make a useless AttemptKey
, it seems worthwhile changing the signature to eliminate that extra work (and have the other call sites use AttemptKey::odcid()
.
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.
Thanks for the review. Mind taking another look @martinthomson?
fn create_qlog_trace(&self, attempt_key: &AttemptKey) -> NeqoQlog { | ||
fn create_qlog_trace(&self, odcid: &ConnectionIdRef<'_>) -> NeqoQlog { |
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.
PublicPacket::dcid
returns a &ConnectionIdRef<'a>
:
neqo/neqo-transport/src/packet/mod.rs
Lines 676 to 678 in 9e6cd93
pub fn dcid(&self) -> &ConnectionIdRef<'a> { | |
&self.dcid | |
} |
Thus I opted for create_qlog_trace
to take a &ConnectionIdRef
instead of a &ConnectionId
since the former can be derived from the latter for free.
Let me know if that is fine by you, or whether you consider this a premature optimization not worth the noise.
(I am a bit confused why PublicPacket::dcid
returns a reference to a reference (i.e. &
and Ref<'_>
) to some data. But that might be out of scope for this pull request.)
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.
Oh, the ref to a ref is probably just to avoid putting Copy
on that struct. Which is silly because it is just a reference itself.
This commit adds support for the qlog
version_information
QUIC event on the server.See #1505 for the client side.
Depends on✔️qlog
patch release with cloudflare/quiche#1684Meta issue: #528
Fixes #1549