linux/drivers/vhost
Michael S. Tsirkin bab632d69e vhost: vhost TX zero-copy support
>From: Shirley Ma <mashirle@us.ibm.com>

This adds experimental zero copy support in vhost-net,
disabled by default. To enable, set
experimental_zcopytx module option to 1.

This patch maintains the outstanding userspace buffers in the
sequence it is delivered to vhost. The outstanding userspace buffers
will be marked as done once the lower device buffers DMA has finished.
This is monitored through last reference of kfree_skb callback. Two
buffer indices are used for this purpose.

The vhost-net device passes the userspace buffers info to lower device
skb through message control. DMA done status check and guest
notification are handled by handle_tx: in the worst case is all buffers
in the vq are in pending/done status, so we need to notify guest to
release DMA done buffers first before we get any new buffers from the
vq.

One known problem is that if the guest stops submitting
buffers, buffers might never get used until some
further action, e.g. device reset. This does not
seem to affect linux guests.

Signed-off-by: Shirley <xma@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-18 10:42:32 -07:00
..
Kconfig net/macvtap: add vhost support 2010-02-18 14:08:38 -08:00
Makefile vhost_net: a kernel-level virtio server 2010-01-15 01:43:29 -08:00
net.c vhost: vhost TX zero-copy support 2011-07-18 10:42:32 -07:00
test.c vhost: support event index 2011-05-30 11:14:15 +09:30
test.h vhost test module 2010-12-09 16:00:21 +02:00
vhost.c vhost: vhost TX zero-copy support 2011-07-18 10:42:32 -07:00
vhost.h vhost: vhost TX zero-copy support 2011-07-18 10:42:32 -07:00