]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC :r340436
authorvmaffione <vmaffione@FreeBSD.org>
Thu, 15 Nov 2018 18:51:37 +0000 (18:51 +0000)
committervmaffione <vmaffione@FreeBSD.org>
Thu, 15 Nov 2018 18:51:37 +0000 (18:51 +0000)
commite54bfecc3e5e7c3e3b23d8e67b066a81464bec14
tree5520f4eaf63e0dc04597ff7cbe904031117089a8
parent4a959192c883d187ac28d9e92b0fedc5d738afb6
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.

Sponsored by: Sunny Valley Networks
Differential Revision: https://reviews.freebsd.org/D17916
Approved by: re (gjb)
sys/dev/netmap/if_vtnet_netmap.h
sys/dev/virtio/network/if_vtnet.c
sys/dev/virtio/network/if_vtnetvar.h