Conversation
tnmysh
reviewed
Sep 9, 2026
| * | ||
| * @return true if the buffer is marked as writable, false otherwise | ||
| */ | ||
| bool virtqueue_is_buffer_writable(struct virtqueue *vq, uint16_t idx); |
Contributor
There was a problem hiding this comment.
This virtqueue layer is not expected to be used by application/firmware directly, instead via rpmsg_virtio layer. I am not sure if we ever need this API for rpmsg_virito.
Author
There was a problem hiding this comment.
I am using open-amp for generic virtio over remoteproc experimentation in Zephyr, and accessing internal flags details is inappropriate. I proposed this new API because I saw that (at least) another has been integrated with the same usecase in mind (9c4ad74).
Collaborator
There was a problem hiding this comment.
Seems reasonable to me if needed for another virtio device than rpmsg
arnopo
reviewed
Sep 9, 2026
WallaceIT
force-pushed
the
writable-buffer-helper
branch
from
September 9, 2026 17:40
ee8caf8 to
b404bcd
Compare
An application at device side might need to know if a buffer has been marked as device-writable by the driver. An example is the virtio SPI protocol, in which the direction of an half-duplex communication can be determined by the device only by checking if the buffer containing the data is writable or not. Add a simple helper to test if a buffer is device-writable, that is, if the VRING_DESC_F_WRITE flag is present on it. Signed-off-by: Francesco Valla <francesco@valla.it>
WallaceIT
force-pushed
the
writable-buffer-helper
branch
from
September 9, 2026 17:42
b404bcd to
7f8af31
Compare
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.
An application, specially at device side, might need to know if a buffer has been marked as writable by the communication partner. An example is the virtio SPI protocol, in which the direction of an half-duplex communication can be determined only by checking if the buffer containing the data is writable or not.
Add a simple helper to test if a buffer is writable, that is, if the VRING_DESC_F_WRITE is present on it.