opnsense-src/sys/dev/virtio
vmaffione 39c0abd7b2 MFC r340436
vtnet: fix netmap support

netmap(4) support for vtnet(4) was incomplete and had multiple bugs.
This commit fixes those bugs to bring netmap on vtnet in a functional state.

Changelist:
  - handle errors returned by virtqueue_enqueue() properly (they were
    previously ignored)
  - make sure netmap XOR rest of the kernel access each virtqueue.
  - compute the number of netmap slots for TX and RX separately, according to
    whether indirect descriptors are used or not for a given virtqueue.
  - make sure sglist are freed according to their type (mbufs or netmap
    buffers)
  - add support for mulitiqueue and netmap host (aka sw) rings.
  - intercept VQ interrupts directly instead of intercepting them in txq_eof
    and rxq_eof. This simplifies the code and makes it easier to make sure
    taskqueues are not running for a VQ while it is in netmap mode.
  - implement vntet_netmap_config() to cope with changes in the number of queues.

Reviewed by:    bryanv
Approved by:    gnn (mentor)
Sponsored by:   Sunny Valley Networks
Differential Revision:  https://reviews.freebsd.org/D17916
2019-01-07 22:02:06 +01:00
..
balloon src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
block src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
console src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
mmio src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
network MFC r340436 2019-01-07 22:02:06 +01:00
pci src: clean-cut move to release/11.1.0 2017-08-20 13:44:58 +02:00
random src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
scsi src: clean-cut move to release/11.1.0 2017-08-20 13:44:58 +02:00
virtio.c src: switch to release/11.2.0 2018-10-07 14:26:34 +02:00
virtio.h src: switch to release/11.2.0 2018-10-07 14:26:34 +02:00
virtio_bus_if.m src: switch to release/11.2.0 2018-10-07 14:26:34 +02:00
virtio_config.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
virtio_ids.h src: switch to release/11.2.0 2018-10-07 14:26:34 +02:00
virtio_if.m src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
virtio_ring.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
virtqueue.c src: switch to release/11.2.0 2018-10-07 14:26:34 +02:00
virtqueue.h src: switch to release/11.2.0 2018-10-07 14:26:34 +02:00