io_uring-echo-server | io_uring echo server | Websocket library
kandi X-RAY | io_uring-echo-server Summary
kandi X-RAY | io_uring-echo-server Summary
io_uring echo server
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of io_uring-echo-server
io_uring-echo-server Key Features
io_uring-echo-server Examples and Code Snippets
Community Discussions
Trending Discussions on io_uring-echo-server
QUESTION
I am playing with liburing and io_uring, the former is built from the master branch and for the latter i am using the kernel 5.8.0-rc3.
I am facing the issue I am going to explain on previous version of the kernel as well (5.7.6, 5.8.0-rc1).
The tests using the provide buffers look like working as expected.
I am trying to implement a network tcp/ip server using IORING_FEAT_FAST_POLL and IORING_OP_PROVIDE_BUFFERS and I am using https://github.com/frevib/io_uring-echo-server as code reference.
The issue I am facing is that the buffer id is always set to the last of the registered buffers but I can see that the actual buffer used by the kernel is not that.
I have reduced the amount of registered buffers to just 10 and added some debugging info, it's now printing the content of all the buffers
Upon the first RECV from the server I get in cqe->flags >> 16
the ID of the buffer containing the data and it's the last one of the list, and I can see that it's containing the data but upon the second RECV the kernel now used the buffer id 0 (the first one) but cqe->flags >> 16
is still containing the ID of the last one.
The cause of this is an invocation of io_uring_prep_provide_buffers
, infact upon the second invocation the issues arise.
Out of curiosity I have also tried to register the buffers one by one using
...ANSWER
Answered 2020-Jul-04 at 12:28There was a bug in the code with re-registering the buffer: https://github.com/frevib/io_uring-echo-server/commit/aa6f2a09ca14c6aa17779a22343b9e7d4b3c7994
Checkout the latest master branch, it should work now: https://github.com/frevib/io_uring-echo-server
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install io_uring-echo-server
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page