Re:Io_uring and Networking in 2023 [pdf]
by twic on Friday February 17, 2023 @10:34AM
(#34835804)
In this code:
Where did bufs come from? Should that be br.bufs[i]?
[ Parent
| on HN ]
i think it should be br[i]
I think so, yes. struct io_uring_buf_ring is a union that includes a bufs member:
struct io_uring_buf bufs[0];The buffers are supplied elsewhere outside that example, just consider it an array of pointers to buffers of size BUF_SIZE. br->bufs[] is the shared space, it holds information on the address/size/id of a given buffer.