|
|
Log in / Subscribe / Register

Zero-copy network transmission with io_uring

Zero-copy network transmission with io_uring

Posted Jan 11, 2022 17:09 UTC (Tue) by farnz (subscriber, #17727)
In reply to: Zero-copy network transmission with io_uring by al4711
Parent article: Zero-copy network transmission with io_uring

Two things here:

  1. Available to everyone; in the process of encrypting using the CPU, I end up with a copy of the data in encrypted form. I don't need to copy that again into kernel buffers, I can just point the kernel at the already encrypted data. Same reasoning applies if I'm not processing the plain text, just forwarding pre-encrypted data (E2E use cases).
  2. For places with big pockets; there exist expensive network cards from brands like Mellanox capable of doing encryption as part of the scatter-gather DMA to the card. kTLS and IPSec both take advantage of this to have the network card encrypt the payload as it copies it out of main memory and onto the wire. This means that I can use kTLS or IPSec and have the communication encrypted on the wire without using CPU time to do the crypto; if I don't have one of the fancy cards, then the kernel encrypts for me, directly copying from my userspace buffer to the kernel's encrypted send buffer.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds