aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/virtio_net.h')
-rw-r--r--include/linux/virtio_net.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index d8e362d52fd8..245eda829aa8 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -23,6 +23,7 @@
23#define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ 23#define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */
24#define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */ 24#define VIRTIO_NET_F_MRG_RXBUF 15 /* Host can merge receive buffers. */
25#define VIRTIO_NET_F_STATUS 16 /* virtio_net_config.status available */ 25#define VIRTIO_NET_F_STATUS 16 /* virtio_net_config.status available */
26#define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */
26 27
27#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ 28#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
28 29
@@ -59,4 +60,21 @@ struct virtio_net_hdr_mrg_rxbuf {
59 __u16 num_buffers; /* Number of merged rx buffers */ 60 __u16 num_buffers; /* Number of merged rx buffers */
60}; 61};
61 62
63/*
64 * Control virtqueue data structures
65 *
66 * The control virtqueue expects a header in the first sg entry
67 * and an ack/status response in the last entry. Data for the
68 * command goes in between.
69 */
70struct virtio_net_ctrl_hdr {
71 __u8 class;
72 __u8 cmd;
73} __attribute__((packed));
74
75typedef __u8 virtio_net_ctrl_ack;
76
77#define VIRTIO_NET_OK 0
78#define VIRTIO_NET_ERR 1
79
62#endif /* _LINUX_VIRTIO_NET_H */ 80#endif /* _LINUX_VIRTIO_NET_H */