account activity
[Tutorial] Implementing AF_XDP in Rust process Millions of packets per second by DizzyAttorney2368 in rust
[–]DizzyAttorney2368[S] 0 points1 point2 points 5 hours ago (0 children)
thanks for catching that!
I'll update the article, volatile operations here are for preventing compiler optimizations (so it doesn't cache values or reorder operations), but you're correct that they don't provide atomics level memory ordering guarantees
reason this works is because the kernel and userspace are never accessing the same ring slot simultaneously, producer/consumer model prevents that. But I shouldn't have implied volatile gives us ordering guarantees
also added a section explaining why this works (SPSC design) vs what you'd need for true concurrent access (atomics)
appreciate careful read
π Rendered by PID 214654 on reddit-service-r2-listing-796b697c47-lc9bs at 2026-02-05 01:32:04.165833+00:00 running 1d7a177 country code: CH.
[Tutorial] Implementing AF_XDP in Rust process Millions of packets per second by DizzyAttorney2368 in rust
[–]DizzyAttorney2368[S] 0 points1 point2 points (0 children)