Zero-copy network transmission with io_uring
Zero-copy network transmission with io_uring
Posted Jan 1, 2022 20:27 UTC (Sat) by jafd (subscriber, #129642)In reply to: Zero-copy network transmission with io_uring by epa
Parent article: Zero-copy network transmission with io_uring
There is a small problem with this "synchronous send" idea. How do you define "sent"? Does it get sent as soon as it reaches the kernel's buffer? Or does it get sent as soon as it reaches the NIC? Or does it get sent as soon as the NIC has put it onto the wire? Note that the NIC has its own buffers, too. Or maybe when it reaches the nearest router? Or as soon as the remote side acknowledges receipt? But what about raw IP, UDP, and who knows what other stateless protocols?
This is a small problem, but it sure opens a huge can of worms.
Years ago I wanted this too. But then I read more about this problem (in the context of a rather good article about buffer bloat and how it actually harms both disk and network performance, who knows if it wasn't here at LWN, years ago), and I don't want it anymore. We can only sensibly agree that the packet is sent as soon as the postman (the kernel) found no immediate problems with it and took it for processing.
