-
Notifications
You must be signed in to change notification settings - Fork 25
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
Quic Support #32
Quic Support #32
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.
Thanks Ben! I've confirmed that functionally there are no panics when running against real traffic on the tap. However, throughput performance is limited. A 0-cycle spin
application subscribed to connection records and filtered on quic
reaches around 29 Gbps processing throughput with ~3% packet loss, whereas a filter for just udp
runs for at least 2 minutes with zero loss. I marked some places where we might be able to improve throughput by reducing the number of copies.
} | ||
|
||
/// Returns the source connection ID of the Quic packet or an empty string if it does not exist | ||
pub fn scid(&self) -> String { |
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.
Same as above
With these changes, I was able to run |
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.
So excited to see this come together and very glad to have the ability to filter on QUIC! This is particularly necessary for some experiments we want to run that will require discarding encrypted traffic.
High-level comments:
- QUIC is a transport and application protocol, which makes it tricky to fit into the Retina framework which assumes each protocol is one or the other. Put two ideas re: naming things clearly where we can.
- I think parsing should be "done" for a given "unit of QUIC data" (which you're defining as a QUIC packet) at some point. Put a comment with an idea of how to do this.
Renaming would be nice. I don't think "ParseResult::Done" ask is a check-in blocker if it's tricky to change or would require a lot more testing.
} | ||
} else { | ||
if let Some(ref mut short_header_value) = quic_clone.short_header { | ||
short_header_value.dcid = |
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.
Based on only delivering short headers if connection id is present from long header, should you only deliver if get_connection_id returns None?
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.
Good question! No, because I only return a ProbeResult::Certain when the header is a long header because those give enough information to be certain. From my understanding, this then results in the connection becoming tracked so that future packets that match this 5 tuple also use the parse pathway, which means they also call the on_match function if successful in initial parsing. Given that it is a part of an existing 5 tuple I'm certain enough that it is a quic header, but there's still a chance that I cannot match the dcid from that packet and so no matter if I get None or Some in the response I'll still want to populate the dcid appropriately.
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.
Renamed Quic -> QuicPacket. Thank you for the insight!
Here are the latest in throughput results as of 26210e3:
Using a modified
Using
|
@thegwan and @thearossman I think all requested changes should be included. Please let me know if there's any other action items to get this merged. |
LGTM! (Assuming it still runs with good performance and outputs sensible parsed results on the live traffic.) |
LGTM! Please rebase on the main branch, I just submitted a fix for the CI failure. |
0121bed
to
fda1e23
Compare
I think I just rebased properly and it should be good to merge. As always, let me know if there are any issues. |
Can you run |
I just merged changes fixing my clippy warnings. I am still seeing quite a few clippy issues from files unrelated to my changes, so I'm not sure if that's an issue? |
* Add quic support * Update main.rs * fix indexing errors * probe indexing change * configs * fix usize error * further usize fixes * another index fix * return configs * minimal performance improvements * config changes * rename file * lazy load bytes * lazy string copy * other string conversion * small change again * renove config changes * rename quic stream * parseresult done * revert parse result * remove configs * this is gonna break a lot * config changes * fix reference errors * import fixes * pub header * public vec_u8 * import hell * rename * slight fixes * everything mutable * this wont work * better cloning * cloning * fix * fully clone * more cloning * copy trait * partial move * remove ref * fix * println debugging * fix * more prints * hashset * from clone * y not * cleanliness * print quic clone * done * remove prints * clear on end * remove dead code * remove imports * remove configs * reference based conn_ids * configs * rename quic to quicpacket * remove quic.toml * remove configs * revert * remove configs * clippy fix
Quic Retina Support
Adds support for subscribing to Quic V1 and V2 packets into Retina. Allows the ability to subscribe to core aspects of Quic headers such as header type (short/long) and packet type (initial, 0-RTT, ...)
New Features
quic.toml
for sample quic application in/configs/quic.toml
Testing Process:
Assumptions and Design Decisions:
Note: These are also included at the top of the
/core/src/protocols/stream/quic/mod.rs
file as well. However, further logic/rational provided here:QuicVersion
Enum in the/core/src/protocols/stream/quic/parser.rs
file