virtio: Replace size return with usedLength in queue_dequeue.
The size was in fact the count of physical entries that were used. That number must necessarily be the same as the number given when adding to the queue, so that number isn't really interesting. Consequently none of the users of that API made use of it. Return the used length instead, which is the way virtio signals how much valid data resides in the dequeued buffer. This is for example important to know the frame length of incoming packets in virtio_net.
This commit is contained in:
@@ -134,7 +134,7 @@ typedef struct {
|
||||
|
||||
uint16 (*queue_size)(virtio_queue queue);
|
||||
|
||||
void* (*queue_dequeue)(virtio_queue queue, uint16* _size);
|
||||
void* (*queue_dequeue)(virtio_queue queue, uint32* _usedLength);
|
||||
|
||||
} virtio_device_interface;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user