Messages in this thread | | | Date | Fri, 14 Jul 2023 08:35:40 -0500 | Subject | Re: [PATCH v14 01/25] docs: gunyah: Introduce Gunyah Hypervisor | From | Alex Elder <> |
| |
On 7/3/23 5:41 PM, Elliot Berman wrote: >> If it's signaled after every message is sent, does it >> indicate that the message has been *received* by VM_B >> (versus just received and copied by Gunyah)? >> > > To connect some dots: the Tx vIRQ is fired when the reader reads a > message and the number of messages still in the queue decrements to the > "not full" threshold. > > https://github.com/quic/gunyah-hypervisor/blob/3d4014404993939f898018cfb1935c2d9bfc2830/hyp/ipc/msgqueue/src/msgqueue_common.c#L142-L148
So the Tx vIRQ on the sender is only fired when the state of the receiver's Rx queue goes from "full" to "not full".
Normally there is no signal sent, and a sender sends messages until it gets a "queue full" flag back from a gh_msgq_send() call. At that point it should stop sending, until the Tx vIRQ fires to indicate the receiver queue has "room" (fewer than the "full threshold" messages are consumed).
There is no way (at this layer of the protocol) to tell whether a given message has been *received*, only that it has been *sent* (meaning the hypervisor has accepted it). And Gunyah provides reliable delivery (each message received in send order, exactly once).
Now that I re-read what you said it makes sense and I guess I just misunderstood. There *might* be a way to reword slightly to prevent any misinterpretation.
Thanks.
-Alex
| |