summaryrefslogtreecommitdiffstats
path: root/include/net/tap.h
Commit message (Collapse)AuthorAgeFilesLines
* virtio-net,tap: use standard-headersMichael S. Tsirkin2015-02-261-23/+1
| | | | | | | Drop duplicated code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
* net: make tap offloading callbacks staticVincenzo Maffione2014-02-251-6/+0
| | | | | | | | Since TAP offloadings are manipulated through a new API, it's not necessary to export them in include/net/tap.h anymore. Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* net: change vnet-hdr TAP prototypesVincenzo Maffione2014-02-251-2/+2
| | | | | | | | | The tap_has_vnet_hdr() and tap_has_vnet_hdr_len() functions used to return int, even though they only return true/false values. This patch changes the prototypes to return bool. Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* tap: multiqueue supportJason Wang2013-02-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Recently, linux support multiqueue tap which could let userspace call TUNSETIFF for a signle device many times to create multiple file descriptors as independent queues. User could also enable/disabe a specific queue through TUNSETQUEUE. The patch adds the generic infrastructure to create multiqueue taps. To achieve this a new parameter "queues" were introduced to specify how many queues were expected to be created for tap by qemu itself. Alternatively, management could also pass multiple pre-created tap file descriptors separated with ':' through a new parameter fds like -netdev tap,id=hn0,fds="X:Y:..:Z". Multiple vhost file descriptors could also be passed in this way. Each TAPState were still associated to a tap fd, which mean multiple TAPStates were created when user needs multiqueue taps. Since each TAPState contains one NetClientState, with the multiqueue nic support, an N peers of NetClientState were built up. A new parameter, mq_required were introduce in tap_open() to create multiqueue tap fds. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tap: introduce a helper to get the name of an interfaceJason Wang2013-02-011-0/+1
| | | | | | | | | | | | | | This patch introduces a helper tap_get_ifname() to get the device name of tap device. This is needed when ifname is unspecified in the command line and qemu were asked to create tap device by itself. In this situation, the name were allocated by kernel, so if multiqueue is asked, we need to fetch its name after creating the first queue. Only linux has this support since it's the only platform that supports multiqueue tap. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tap: support enabling or disabling a queueJason Wang2013-02-011-0/+2
| | | | | | | | | | | This patch introduce a new bit - enabled in TAPState which tracks whether a specific queue/fd is enabled. The tap/fd is enabled during initialization and could be enabled/disabled by tap_enalbe() and tap_disable() which calls platform specific helpers to do the real work. Polling of a tap fd can only done when the tap was enabled. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: tap: using bool instead of bitfieldJason Wang2013-02-011-2/+2
| | | | | Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: reorganize headersPaolo Bonzini2012-12-191-0/+67
Move public headers to include/net, and leave private headers in net/. Put the virtio headers in include/net/tap.h, removing the multiple copies that existed. Leave include/net/tap.h as the interface for NICs, and net/tap_int.h as the interface for OS-specific parts of the tap backend. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud