aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_net.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2009-02-04 04:02:40 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-04 19:35:12 -0500
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 @@
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#define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */
27#define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */
27 28
28#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ 29#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
29 30
@@ -77,4 +78,14 @@ typedef __u8 virtio_net_ctrl_ack;
77#define VIRTIO_NET_OK 0 78#define VIRTIO_NET_OK 0
78#define VIRTIO_NET_ERR 1 79#define VIRTIO_NET_ERR 1
79 80
81/*
82 * Control the RX mode, ie. promisucous and allmulti. PROMISC and
83 * ALLMULTI commands require an "out" sg entry containing a 1 byte
84 * state value, zero = disable, non-zero = enable. These commands
85 * are supported with the VIRTIO_NET_F_CTRL_RX feature.
86 */
87#define VIRTIO_NET_CTRL_RX 0
88 #define VIRTIO_NET_CTRL_RX_PROMISC 0
89 #define VIRTIO_NET_CTRL_RX_ALLMULTI 1
90
80#endif /* _LINUX_VIRTIO_NET_H */ 91#endif /* _LINUX_VIRTIO_NET_H */