C# Networking Deep Dive - io_uring from scratch part 4 - Zero Copy Receive
Rabbit holes and disappointment define part 4.
io_uring zcrx (zero copy receive) looks great on paper and presentations but implementing it is a pain in the ass, it is very far from being widely used, requires specialized hardware (NIC) and leaks into the application design. I'd say that nowadays its single use case are very specialized solutions.
Part 4 TLDR;
zcrx allows registering a memory area that our NIC DMAs received packets' payload into. This eliminates the extra copy the kernel does when the NIC DMAs into kernel memory instead. The whole shebang comes with an hefty price though, we no longer own the buffers and it becomes more complex "isolate memory per thread"(ensure threads don't access each other's memory), deteriorating memory caching per CPU thread and making it a lot more complex to ensure that each reactor/worker never thread hops.
On top of that I can't test it because I don't have a NIC that supports this so who knows if it is any good..
Not too happy about this part 4 but can be insightful to read about this zero copy rx possibility even though my guess is that it will likely never see the light of day.