169 points · by ingve · 3y ago · 37 comments
https://blogs.oracle.com/javamagazine/post/java-loom-virtual...
for (i = 0; i < BUFS_IN_GROUP; i++) {
/* add each buffer, we'll use i buffer ID */
io_uring_buf_ring_add(br, bufs[i], BUF_SIZE, i,
io_uring_buf_ring_mask(BUFS_IN_GROUP), i);
}
Where did bufs come from? Should that be br.bufs[i]? struct io_uring_buf bufs[0];After working on one of our internal pieces of software, I have a strong hunch that io_uring could boost its throughput, and I'd like to have a PoC, but low-level network programming is definitely outside my areas of expertise.
Any suggestions ?
It's a good place to learn socket programming using the POSIX sockets API, but that's it.
You might be interested in my book[1] which teaches network programming.
other resources are more of a 'tactical' nature, while what you need is something more strategic.
DPDK/SPDK are ways to directly to use the device involved.
io_uring is a way to manage event flow between the kernel and userspace.