aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_net.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2009-02-04 04:02:50 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-04 19:35:13 -0500
commit0bde95690d65653e420d04856c5d5783155c747c (patch)
tree480f2e23d6d5cf39af1bc86e209dd2cc68695301 /include/linux/virtio_net.h
parentf565a7c259d71cc186753653d978c646d2354b36 (diff)
virtio_net: Add support for VLAN filtering in the hypervisor
VLAN filtering allows the hypervisor to drop packets from VLANs that we're not a part of, further reducing the number of extraneous packets recieved. This makes use of the VLAN virtqueue command class. The CTRL_VLAN feature bit tells us whether the backend supports VLAN filtering. 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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index ba82b653cace..242348bb3766 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -25,6 +25,7 @@
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#define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */
28#define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */
28 29
29#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ 30#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
30 31
@@ -111,4 +112,17 @@ struct virtio_net_ctrl_mac {
111#define VIRTIO_NET_CTRL_MAC 1 112#define VIRTIO_NET_CTRL_MAC 1
112 #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 113 #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0
113 114
115/*
116 * Control VLAN filtering
117 *
118 * The VLAN filter table is controlled via a simple ADD/DEL interface.
119 * VLAN IDs not added may be filterd by the hypervisor. Del is the
120 * opposite of add. Both commands expect an out entry containing a 2
121 * byte VLAN ID. VLAN filterting is available with the
122 * VIRTIO_NET_F_CTRL_VLAN feature bit.
123 */
124#define VIRTIO_NET_CTRL_VLAN 2
125 #define VIRTIO_NET_CTRL_VLAN_ADD 0
126 #define VIRTIO_NET_CTRL_VLAN_DEL 1
127
114#endif /* _LINUX_VIRTIO_NET_H */ 128#endif /* _LINUX_VIRTIO_NET_H */