[ipxe-devel] [PATCH v2 2/4] [virtio] Add virtio 1.0 constants and data structures

Ladi Prosek lprosek at redhat.com
Wed Mar 16 08:08:27 UTC 2016


On Tue, Mar 15, 2016 at 6:36 PM, Stefan Hajnoczi <stefanha at redhat.com> wrote:
> On Mon, Mar 14, 2016 at 03:48:23PM +0100, Ladi Prosek wrote:
>> Virtio 1.0 introduces new constants and data structures, common to
>> all devices as well as specific to virtio-net. This commit adds a
>> subset of these to be able to drive the virtio-net 1.0 network
>> device.
>>
>> Signed-off-by: Ladi Prosek <lprosek at redhat.com>
>> ---
>>  src/drivers/net/virtio-net.h   | 18 +++++++++++++
>>  src/include/ipxe/virtio-pci.h  | 60 ++++++++++++++++++++++++++++++++++++++++++
>>  src/include/ipxe/virtio-ring.h |  8 ++++++
>>  3 files changed, 86 insertions(+)
>>
>> diff --git a/src/drivers/net/virtio-net.h b/src/drivers/net/virtio-net.h
>> index 3abef28..5bde7d7 100644
>> --- a/src/drivers/net/virtio-net.h
>> +++ b/src/drivers/net/virtio-net.h
>> @@ -15,6 +15,14 @@
>>  #define VIRTIO_NET_F_HOST_ECN   13      /* Host can handle TSO[6] w/ ECN in. */
>>  #define VIRTIO_NET_F_HOST_UFO   14      /* Host can handle UFO in. */
>>
>> +/* Virtio 1.0 feature bits for virtio net */
>> +#define VIRTIO_NET_F_MRG_RXBUF  15      /* Driver can merge receive buffers. */
>> +#define VIRTIO_NET_F_STATUS     16      /* Configuration status field is available. */
>> +#define VIRTIO_NET_F_CTRL_VQ    17      /* Control channel is available. */
>> +#define VIRTIO_NET_F_CTRL_RX    18      /* Control channel RX mode support. */
>> +#define VIRTIO_NET_F_CTRL_VLAN  19      /* Control channel VLAN filtering. */
>> +#define VIRTIO_NET_F_GUEST_ANNOUNCE 21  /* Driver can send gratuitous packets. */
>
> Please drop the comment about Virtio 1.0, these were all in virtio
> 0.9.5:
> https://ozlabs.org/~rusty/virtio-spec/virtio-0.9.5.pdf
>
> None of them seem necessary for the VIRTIO 1.0 implementation but there
> is little harm in adding these #defines.

Will do, thanks.



More information about the ipxe-devel mailing list