[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Virtio Extended Descriptors idea/proposal
Hello,
Iâd like to circulate an idea around - if something like this has been discussed in the past, please let me know (I was not able to find anything in the archives).
In the packed virtqueue design, a single descriptor contains a buffer address along with associated metadata (ID and length) as well as a set of flags. All descriptors are associated with a piece of data that is indirectly referenced by the descriptor,
and hence the receiver needs to:
This is well suited for cases where data allocation and transmission through the virtqueue take place at different points in time, or when the data will be passed around several times. One example is networking, where packets are allocated at
some point, operated on (possibly not even within a single thread), and then eventually sent out to the NIC.
However I think it would be beneficial to also support a scheme where data is directly embedded in the descriptor itself (what I call here âextended descriptorâ), which would make virtio more generically applicable. This works well in cases where
the data is generated right before the descriptor is sent - for example, all configuration/control messages, or when the amount of data to be sent is very small and fixed in size. Certain hardware devices might also prefer to operate this way since they donât
have the extra level of indirection.
In such cases, simplification benefits aside, we expect this scheme to present a number of performance benefits:
The intention of this email is to present the idea and see what other people think - I would be happy to work on a patch for the specification if there is interest, and use it to drive a more detailed discussion. In short, I think the following
changes would be required:
When this feature is negotiated and enabled for a given queue, the size of the descriptor is effectively (16 bytes + extended descriptor size) and drivers/devices are free to insert any device-specific data in the extended portion of the descriptor.
Mario.
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]