compio-rs / compio

A thread-per-core Rust runtime with IOCP/io_uring/polling.
MIT License
420 stars 37 forks source link

feat: add entry flags #97

Closed Sherlock-Holo closed 1 year ago

Sherlock-Holo commented 1 year ago

add flags field for Entry

in io-uring, the cqe flags is meaningful, add this field can let driver use the flags

in IOCP or epoll, this flags can be simply set to 0

Berrysoft commented 1 year ago

Would you point out clearer that what kind of operation will set this flag?

Sherlock-Holo commented 1 year ago

for example:

when use Recv with buf_group to use provider buffers/register buffers, you should check the cqe flags to get the buffer id, that is the example (the example use Read but Recv is also use cqe flags to get buffer id)

the RecvMulti must use provider buffers/register buffers, so you need to check the cqe flags too

Berrysoft commented 1 year ago

We don't support pushing custom squeue::Entry to the driver directly now, so the cases you mentioned is not practical.

This feature should be together with a PR which adds registered buffer support or *Multi opcode support.

George-Miao commented 1 year ago

@Sherlock-Holo Should this flag also be exposed to higher level results? Seems like currently we don’t have way to expose such flags.

Sherlock-Holo commented 1 year ago

adding registered buffer support or *Multi opcode support is more complicated than this, adding flags field is the first step

Berrysoft commented 1 year ago

A simple change without usage is unnecessary.

George-Miao commented 1 year ago

Will there be further update on this PR?

Berrysoft commented 1 year ago

Suppressed by #102