genode/repos/os/include/virtio
Norman Feske 162ddb1fdb virtio: fix len calculation
Thanks to Piotr Tworek for the fix and his explanation as follows:

The basic idea is to try to fit payload data into the descriptor used to
send the header. If there is no payload, or the payload fits exactly
into the remaining space in the header decriptor, len should be 0 and
only one descriptor should be used. In such case the "next" and "flags"
members of the descriptor structure should be set to 0.

In case there is some extra payload data to send, but its size is
bigger than the remaining free space in the descriptor used to send the
header, len should contain the remaining size of the payload that
can't be sent via the header descriptor. The code will then chain
additional descriptors to handle this remainder.

With the len variable shadowing, the code will never queue the remaining
data.

Issue #4327
2021-12-17 15:04:43 +01:00
..
mmio_device.h platform driver: make device info XML optional 2021-05-05 11:31:16 +02:00
pci_device.h platform driver: make device info XML optional 2021-05-05 11:31:16 +02:00
queue.h virtio: fix len calculation 2021-12-17 15:04:43 +01:00