summaryrefslogtreecommitdiffstats
path: root/hw/virtio-net.h
Commit message (Collapse)AuthorAgeFilesLines
* virtio-net: mac property is mandatoryMichael S. Tsirkin2010-01-121-1/+0
| | | | | | | | | | Mac feature bit isn't going to work as all network cards already have a 'mac' property to set the mac address. Remove it from mask and add in get_features. Reported-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio: add features as qdev propertiesMichael S. Tsirkin2010-01-111-0/+20
| | | | | | | | | | | | | Add feature bits as properties to virtio. This makes it possible to e.g. define machine without indirect buffer support, which is required for 0.10 compatibility, or without hardware checksum support, which is required for 0.11 compatibility. Since default values for optional features are now set by qdev, get_features callback has been modified: it sets non-optional bits, and clears bits not supported by host. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-net: Add new RX filter controlsAlex Williamson2009-06-091-4/+10
| | | | | | | | Add a few new RX modes to better control the receive_filter. These are all fairly obvious features that hardware could provide. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* Virtio-net qdev conversionPaul Brook2009-05-141-2/+0
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)aliguori2009-02-111-1/+1
| | | | | | | | | | | | | | Change the PCI network drivers init functions to return the PCIDev, to inform which slot has been hot-plugged. Also record PCIDevice structure on NICInfo to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6593 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu:virtio-net: Add VLAN filtering (Alex Williamson)aliguori2009-02-051-0/+14
| | | | | | | | | | | | | 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
* qemu:virtio-net: Add additional MACs via a filter table (Alex Williamson)aliguori2009-02-051-0/+22
| | | | | | | | | | | | | | | | | | | | | Create a filter table and allow the guest to populate it with the MAC class control commands. We manage the size and usage of the filter table including enabling promiscuous and all-multi modes as necessary. The guest should therefore assume the table is infinite. Eventually this might allow us to bind directly to a hardware NIC and manipulate a physical MAC filter. The specifics of the TABLE_SET command are documented in virtio-net.h. Separate buffers in the same command are used for unicaste and multicast addresses for priority and sychronization. With this we can export the VIRTIO_NET_F_CTRL_RX feature bit. 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@6539 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu:virtio-net: Add promiscuous and all-multicast mode bits (Alex Williamson)aliguori2009-02-051-0/+11
| | | | | | | | | | | | | | | | 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
* qemu:virtio-net: Add a virtqueue for control commands from the guest (Alex ↵aliguori2009-02-051-0/+18
| | | | | | | | | | | | | | | | | | Williamson) This will be used for RX mode, MAC table, VLAN table control, etc... The control transaction consists of one or more "out" sg entries and one or more "in" sg entries. The first out entry contains a header defining the class and command. Additional out entries may provide data for the command. A response via the ack entry is required and the guest will typically be waiting for it. 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@6536 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu:virtio-net: Define ETH_ALEN for use when manipulating MAC addresses ↵aliguori2009-02-051-0/+2
| | | | | | | | | | | | (Alex Williamson) Makes it much easier to search too. 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@6535 c046a42c-6fe2-441c-8c8c-71466251a162
* Make virtio_net_init() return void (Mark McLoughlin)aliguori2009-01-131-1/+1
| | | | | | | | | | | | All PCI NIC init functions return void and nothing uses the return value from virtio_net_init(). Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6291 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement virtio_net link status (Mark McLoughlin)aliguori2009-01-081-1/+6
| | | | | | | | | | | | Implement the VIRTIO_NET_F_STATUS feature by exposing the link status through virtio_net_config::status. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6250 c046a42c-6fe2-441c-8c8c-71466251a162
* virtio-net supportaliguori2008-12-171-0/+80
This adds virtio-net support. This is based on the virtio-net driver that exists in kvm-userspace. This also adds a new qemu_sendv_packet which virtio-net requires. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6073 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud