Repository navigation
Conversation
Member
|
It seems unsafe to set cc @George-Miao |
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a buffer ring registered with
IOU_PBUF_RING_INC(Linux 6.12), the kernel consumes provided buffers incrementally. When it keeps a buffer for more completions, it setsIORING_CQE_F_BUF_MORE(uapi, v6.12).Extraexposesbuffer_idbut not this flag (extra/mod.rs), so an op can't tell whether it may give the buffer back, or whether the next completion with the same id continues in it.This adds
Extra::buffer_more()next tobuffer_id()andsock_nonempty().BufferPoolitself still assumes each completion uses up a whole buffer. Withbuffer_pool_flag(IOU_PBUF_RING_INC), the managed ops hand out every completion from the start of the buffer. They also put the buffer back in the ring on drop even while the kernel still holds it. Fixing that means tracking per-buffer offsets in the pool, which is a separate change. This one only makes the flag visible.The tests receive 5 bytes into a single 4 KiB buffer:
buffer_more()is set on an INC ring and clear on a plain one. Both pass on Linux 6.18 and skip where the INC ring can't be registered.