diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:36:16 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:36:16 +0000 |
commit | 3d11d36c7fef499128c4194cea7c58d0f7af82ec (patch) | |
tree | 7044b25685fa0a2ce52ddcdce296f851e897b1ce /hw/virtio-net.h | |
parent | 7967406801aa897fae83caad3278ac85a342adaa (diff) |
qemu:virtio-net: Add a virtqueue for control commands from the guest (Alex Williamson)
This will be used for RX mode, MAC table, VLAN table control, etc...
The control transaction consists of one or more "out" sg entries and
one or more "in" sg entries. The first out entry contains a header
defining the class and command. Additional out entries may provide
data for the command. A response via the ack entry is required
and the guest will typically be waiting for it.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6536 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio-net.h')
-rw-r--r-- | hw/virtio-net.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 9dce663bb6..119e38db98 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -40,6 +40,7 @@ #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ #define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ #define VIRTIO_NET_F_STATUS 16 /* virtio_net_config.status available */ +#define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ @@ -84,4 +85,21 @@ struct virtio_net_hdr_mrg_rxbuf void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); +/* + * Control virtqueue data structures + * + * The control virtqueue expects a header in the first sg entry + * and an ack/status response in the last entry. Data for the + * command goes in between. + */ +struct virtio_net_ctrl_hdr { + uint8_t class; + uint8_t cmd; +}; + +typedef uint8_t virtio_net_ctrl_ack; + +#define VIRTIO_NET_OK 0 +#define VIRTIO_NET_ERR 1 + #endif |