aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-net.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:36:20 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:36:20 +0000
commit002437cd42a84261fed26b2d0c3feae0e0c9b241 (patch)
tree419c753e67da89f8d52626ac09463f5b42a7a446 /hw/virtio-net.h
parent3d11d36c7fef499128c4194cea7c58d0f7af82ec (diff)
qemu:virtio-net: Add promiscuous and all-multicast mode bits (Alex Williamson)
Add a new RX_MODE control virtqueue class with commands PROMISC and ALLMULTI and usage documented in virtio-net.h allowing the guest to manipulate packet receiving options. We don't export a feature for this until we also add the MAC filter table. Note, for compatibility with older guest drivers we need to default to promiscuous. 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@6537 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio-net.h')
-rw-r--r--hw/virtio-net.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/virtio-net.h b/hw/virtio-net.h
index 119e38db98..ce8e4b48f0 100644
--- a/hw/virtio-net.h
+++ b/hw/virtio-net.h
@@ -41,6 +41,7 @@
#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_F_CTRL_RX 18 /* Control channel RX mode support */
#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
@@ -102,4 +103,14 @@ typedef uint8_t virtio_net_ctrl_ack;
#define VIRTIO_NET_OK 0
#define VIRTIO_NET_ERR 1
+/*
+ * Control the RX mode, ie. promisucous and allmulti. PROMISC and
+ * ALLMULTI commands require an "out" sg entry containing a 1 byte
+ * state value, zero = disable, non-zero = enable. These commands
+ * are supported with the VIRTIO_NET_F_CTRL_RX feature.
+ */
+#define VIRTIO_NET_CTRL_RX_MODE 0
+ #define VIRTIO_NET_CTRL_RX_MODE_PROMISC 0
+ #define VIRTIO_NET_CTRL_RX_MODE_ALLMULTI 1
+
#endif