On Tue, 9 May 2023 at 06:28, Nir Soffer wrote:
>
> When we check if a driver needs a signal, we compare:
>
> - used_event: written by the driver each time it consumes an item
In practice drivers tend to update it as you described, but devices
cannot make that assumption.
used_event is simply the
When we check if a driver needs a signal, we compare:
- used_event: written by the driver each time it consumes an item
- new: current idx written to the used ring, updated by us
- old: last idx we signaled about
We call vring_need_event() which does:
return (__u16)(new_idx - event_idx - 1)