diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-08 19:46:33 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-08 19:46:33 +0000 |
commit | 554c97dd43e021b626c78ed5bd72bca33d5cb99c (patch) | |
tree | 78e4b93f943ff43051ad972e5f39221e35bccb67 /hw/virtio-net.h | |
parent | 99ed7e30cbd6862ef3bb1ebe51c8a4923d0e282b (diff) | |
download | qemu-554c97dd43e021b626c78ed5bd72bca33d5cb99c.tar.gz qemu-554c97dd43e021b626c78ed5bd72bca33d5cb99c.tar.bz2 qemu-554c97dd43e021b626c78ed5bd72bca33d5cb99c.zip |
Implement virtio_net link status (Mark McLoughlin)
Implement the VIRTIO_NET_F_STATUS feature by exposing the link status
through virtio_net_config::status.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6250 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio-net.h')
-rw-r--r-- | hw/virtio-net.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 0d9f71ba1a..9ac9e34ae1 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -37,16 +37,21 @@ #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. */ #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_S_LINK_UP 1 /* Link is up */ #define TX_TIMER_INTERVAL 150000 /* 150 us */ /* Maximum packet size we can receive from tap device: header + 64k */ #define VIRTIO_NET_MAX_BUFSIZE (sizeof(struct virtio_net_hdr) + (64 << 10)) -/* The config defining mac address (6 bytes) */ struct virtio_net_config { + /* The config defining mac address (6 bytes) */ uint8_t mac[6]; + /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ + uint16_t status; } __attribute__((packed)); /* This is the first element of the scatter-gather list. If you don't |