-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
proto: write outgoing packets to caller-supplied memory #729
Comments
This PR #1545 seems to have addressed this issue |
It has not; refer to the signature of |
I'm giving it a try 👍 |
Just surfing by, and saw this. This type of issue is super important for io_uring, AF_XDP, DPDK, (Networking APIs to get to 100Gbits/sec++) Actually to take Quinn or any Rust Quic stack to the next level the whole RX & TX hot paths should be allocation-free except by the consumer of the Quic stack. It would be great to have a Rust Quic stack that allows caller-supplied buffers for both the RX & TX paths, and is allocation-free on the hot path. |
This was fixed by @lmpn's generous contribution in #1697.
We already decrypt in-place in caller-supplied memory, and only alloc/copy on the receive path when needed to reduce memory usage. Memory allocation is not currently a bottleneck for Quinn; if you want to hit massive throughput, parallelism and encryption are your main bottlenecks. If you're interested in hitting demanding performance targets with Quinn, feel free to open a new issue to discuss any obstacles you encounter. |
Connection::poll_transmit
allocates and immediately returns aVec<u8>
. There's no reason it couldn't instead take a&mut [MaybeUninit<u8>]
or similar, giving the caller much greater flexibility to reduce allocations/copies, particularly when working with e.g. registered io_uring buffers.The text was updated successfully, but these errors were encountered: