diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:36:32 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:36:32 +0000 |
commit | f21c0ed97c9754683b168deb6112b3a280361ff2 (patch) | |
tree | 332d49aa8ef6784c3bf3a1080b7967547f97bfe6 /hw/virtio-net.h | |
parent | b6503ed9b8815ecfb82fe9faba28936365321248 (diff) | |
download | qemu-f21c0ed97c9754683b168deb6112b3a280361ff2.zip qemu-f21c0ed97c9754683b168deb6112b3a280361ff2.tar.gz qemu-f21c0ed97c9754683b168deb6112b3a280361ff2.tar.bz2 |
qemu:virtio-net: Add VLAN filtering (Alex Williamson)
Use the control virtqueue to allow the guest to enable and manipulate
a VLAN filter table. This allows us to drop more packets the guest
doesn't want to see. We define a new VLAN class for the control
virtqueue with commands ADD and DEL with usage defined in virtio-net.h.
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@6540 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio-net.h')
-rw-r--r-- | hw/virtio-net.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 291fa9d..95587f7 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -42,6 +42,7 @@ #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_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ @@ -135,4 +136,17 @@ struct virtio_net_ctrl_mac { #define VIRTIO_NET_CTRL_MAC 1 #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 +/* + * Control VLAN filtering + * + * The VLAN filter table is controlled via a simple ADD/DEL interface. + * VLAN IDs not added may be filterd by the hypervisor. Del is the + * opposite of add. Both commands expect an out entry containing a 2 + * byte VLAN ID. VLAN filterting is available with the + * VIRTIO_NET_F_CTRL_VLAN feature bit. + */ +#define VIRTIO_NET_CTRL_VLAN 2 + #define VIRTIO_NET_CTRL_VLAN_ADD 0 + #define VIRTIO_NET_CTRL_VLAN_DEL 1 + #endif |