diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-01-19 20:09:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:34:53 -0500 |
commit | 9f4d26d0f3016cf8813977d624751b94465fa317 (patch) | |
tree | ac17805553ff3b3bc570ed73027b150e7ba3b88b /include/linux/virtio_net.h | |
parent | 357fe2c6d2b12482abd1c3f24a086a2f507f03fc (diff) |
virtio_net: add link status handling
Allow the host to inform us that the link is down by adding
a VIRTIO_NET_F_STATUS which indicates that device status is
available in virtio_net config.
This is currently useful for simulating link down conditions
(e.g. using proposed qemu 'set_link' monitor command) but
would also be needed if we were to support device assignment
via virtio.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (added future masking)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/virtio_net.h')
-rw-r--r-- | include/linux/virtio_net.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 5cdd0aa8bde9..f76bd4a753ef 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -21,11 +21,16 @@ | |||
21 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ | 21 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ |
22 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ | 22 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ |
23 | #define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ | 23 | #define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ |
24 | #define VIRTIO_NET_F_STATUS 16 /* virtio_net_config.status available */ | ||
25 | |||
26 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | ||
24 | 27 | ||
25 | struct virtio_net_config | 28 | struct virtio_net_config |
26 | { | 29 | { |
27 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 30 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
28 | __u8 mac[6]; | 31 | __u8 mac[6]; |
32 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | ||
33 | __u16 status; | ||
29 | } __attribute__((packed)); | 34 | } __attribute__((packed)); |
30 | 35 | ||
31 | /* This is the first element of the scatter-gather list. If you don't | 36 | /* This is the first element of the scatter-gather list. If you don't |