numam-dpdk/examples/vhost
Ouyang Changchun c3dfe188ba examples/vhost: zero copy mode
This patch supports user space vhost zero copy. It removes packets copying between host and guest in RX/TX.
It introduces an extra ring to store the detached mbufs. At initialization stage all mbufs will put into
this ring; when one guest starts, vhost gets the available buffer address allocated by guest for RX and
translates them into host space addresses, then attaches them to mbufs and puts the attached mbufs into
mempool.
Queue starting and DMA refilling will get mbufs from mempool and use them to set the DMA addresses.

For TX, it gets the buffer addresses of available packets to be transmitted from guest and translates
them to host space addresses, then attaches them to mbufs and puts them to TX queues.
After TX finishes, it pulls mbufs out from mempool, detaches them and puts them back into the extra ring.

Signed-off-by: Ouyang Changchun <changchun.ouyang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-05-28 16:00:55 +02:00
..
eventfd_link examples/vhost: import userspace vhost application 2014-02-26 10:47:59 +01:00
libvirt examples/vhost: import userspace vhost application 2014-02-26 10:47:59 +01:00
main.c examples/vhost: zero copy mode 2014-05-28 16:00:55 +02:00
main.h examples/vhost: import userspace vhost application 2014-02-26 10:47:59 +01:00
Makefile config: rename "default" configurations as "native" 2014-05-21 16:25:06 +02:00
vhost-net-cdev.c examples/vhost: import userspace vhost application 2014-02-26 10:47:59 +01:00
vhost-net-cdev.h examples/vhost: import userspace vhost application 2014-02-26 10:47:59 +01:00
virtio-net.c examples/vhost: zero copy mode 2014-05-28 16:00:55 +02:00
virtio-net.h examples/vhost: zero copy mode 2014-05-28 16:00:55 +02:00