numam-dpdk/doc/guides/sample_app_ug
Jianfeng Tan ce2eabdd43 net/virtio-user: add virtual device
Add a new virtual device named virtio-user, which can be used just like
eth_ring, eth_null, etc. To reuse the code of original virtio, we do
some adjustment in virtio_ethdev.c, such as remove key _static_ of
eth_virtio_dev_init() so that it can be reused in virtual device; and
we add some check to make sure it will not crash.

Configured parameters include:
  - queues (optional, 1 by default), number of queue pairs, multi-queue
    not supported for now.
  - cq (optional, 0 by default), not supported for now.
  - mac (optional), random value will be given if not specified.
  - queue_size (optional, 256 by default), size of virtqueues.
  - path (madatory), path of vhost user.

When enable CONFIG_RTE_VIRTIO_USER (enabled by default), the compiled
library can be used in both VM and container environment.

Examples:
path_vhost=<path_to_vhost_user> # use vhost-user as a backend

sudo ./examples/l2fwd/build/l2fwd -c 0x100000 -n 4 \
    --socket-mem 0,1024 --no-pci --file-prefix=l2fwd \
    --vdev=virtio-user0,mac=00:01:02:03:04:05,path=$path_vhost -- -p 0x1

Known issues:
 - Control queue and multi-queue are not supported yet.
 - Cannot work with --huge-unlink.
 - Cannot work with no-huge.
 - Cannot work when there are more than VHOST_MEMORY_MAX_NREGIONS(8)
   hugepages.
 - Root privilege is a must (mainly becase of sorting hugepages according
   to physical address).
 - Applications should not use file name like HUGEFILE_FMT ("%smap_%d").
 - Cannot work with vhost-net backend.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-06-22 09:47:12 +02:00
..
img doc: update IPsec sample guide 2016-06-21 12:12:25 +02:00
cmd_line.rst doc: drop old naming of the project 2016-02-10 15:47:51 +01:00
dist_app.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
ethtool.rst examples/ethtool: add user-space ethtool sample application 2015-12-08 03:00:42 +01:00
exception_path.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
hello_world.rst doc: remove Intel references from sample apps guide 2014-12-19 23:30:26 +01:00
index.rst app/pdump: add tool for packet capturing 2016-06-16 23:40:21 +02:00
intel_quickassist.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
intro.rst doc: remove Intel references from sample apps guide 2014-12-19 23:30:26 +01:00
ip_frag.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
ip_pipeline.rst examples/ip_pipeline: support KNI 2016-06-21 18:05:45 +02:00
ip_reassembly.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
ipsec_secgw.rst doc: update IPsec sample guide 2016-06-21 12:12:25 +02:00
ipv4_multicast.rst eal: add assert macro for debug 2016-05-02 15:31:17 +02:00
keep_alive.rst doc: fix keepalive sample app guide 2016-03-08 12:40:49 +01:00
kernel_nic_interface.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
l2_forward_cat.rst doc: fix spellings 2016-04-07 23:27:45 +02:00
l2_forward_crypto.rst doc: fix l2fwd-crypto sample command 2016-06-07 22:19:59 +02:00
l2_forward_job_stats.rst examples: remove useless check of port count 2016-05-16 21:01:51 +02:00
l2_forward_real_virtual.rst examples: remove useless check of port count 2016-05-16 21:01:51 +02:00
l3_forward_access_ctrl.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
l3_forward_power_man.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
l3_forward_virtual.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
l3_forward.rst hash: remove aliases for bulk lookup 2016-04-20 13:49:36 +02:00
link_status_intr.rst examples: remove useless check of port count 2016-05-16 21:01:51 +02:00
load_balancer.rst doc: fix repeated typo in sample app guides 2015-12-07 04:57:16 +01:00
multi_process.rst doc: fix references in guides 2016-04-11 23:56:34 +02:00
netmap_compatibility.rst doc: fix examples in netmap compatibility guide 2015-12-07 04:57:16 +01:00
packet_ordering.rst doc: fix spellings and typos 2015-04-29 18:34:58 +02:00
pdump.rst app/pdump: add tool for packet capturing 2016-06-16 23:40:21 +02:00
performance_thread.rst doc: fix spellings 2015-12-15 13:50:42 +01:00
proc_info.rst app/proc_info: rename binary with prefix 2015-12-06 15:41:05 +01:00
ptpclient.rst doc: add PTP client sample guide 2015-11-13 17:45:14 +01:00
qos_metering.rst doc: refactor table numbers into references 2015-05-25 15:59:36 +02:00
qos_scheduler.rst doc: fix repeated typo in sample app guides 2015-12-07 04:57:16 +01:00
quota_watermark.rst doc: refactor figure numbers into references 2015-05-25 15:59:36 +02:00
rxtx_callbacks.rst doc: add Rx and Tx callbacks sample app user guide 2015-03-17 22:16:46 +01:00
skeleton.rst doc: add basic forwarding skeleton user guide 2015-03-17 22:16:46 +01:00
tep_termination.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
test_pipeline.rst doc: fix spellings 2015-12-15 13:50:42 +01:00
timer.rst doc: fix repeated typo in sample app guides 2015-12-07 04:57:16 +01:00
vhost.rst net/virtio-user: add virtual device 2016-06-22 09:47:12 +02:00
vm_power_management.rst doc: fix references in sample apps guide 2016-03-07 21:42:57 +01:00
vmdq_dcb_forwarding.rst examples/vmdq_dcb: support X710 2016-03-16 17:47:10 +01:00