summaryrefslogtreecommitdiff
path: root/include/linux/virtio_net.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2009-02-04 09:02:40 +0000
committerDavid S. Miller <davem@davemloft.net>2009-02-04 16:35:12 -0800
commit2af7698e2dd698d452ab9d63a9ca5956bbe8fc3b (patch)
treeb4f767eb2b15d85b0f4ebe1cd560b296f44cc8a1 /include/linux/virtio_net.h
parent2a41f71d3bd97dde3305b4e1c43ab0eca46e7c71 (diff)
virtio_net: Add a set_rx_mode interface
Make use of the RX_MODE control virtqueue class to enable the set_rx_mode netdev interface. This allows us to selectively enable/disable promiscuous and allmulti mode so we don't see packets we don't want. For now, we automatically enable these as needed if additional unicast or multicast addresses are requested. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/virtio_net.h')
-rw-r--r--include/linux/virtio_net.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 245eda829aa8..63b2461a40f1 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -24,6 +24,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 */
@@ -77,4 +78,14 @@ typedef __u8 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 0
+ #define VIRTIO_NET_CTRL_RX_PROMISC 0
+ #define VIRTIO_NET_CTRL_RX_ALLMULTI 1
+
#endif /* _LINUX_VIRTIO_NET_H */