ce2eabdd43
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> |
||
---|---|---|
.. | ||
img | ||
cmd_line.rst | ||
dist_app.rst | ||
ethtool.rst | ||
exception_path.rst | ||
hello_world.rst | ||
index.rst | ||
intel_quickassist.rst | ||
intro.rst | ||
ip_frag.rst | ||
ip_pipeline.rst | ||
ip_reassembly.rst | ||
ipsec_secgw.rst | ||
ipv4_multicast.rst | ||
keep_alive.rst | ||
kernel_nic_interface.rst | ||
l2_forward_cat.rst | ||
l2_forward_crypto.rst | ||
l2_forward_job_stats.rst | ||
l2_forward_real_virtual.rst | ||
l3_forward_access_ctrl.rst | ||
l3_forward_power_man.rst | ||
l3_forward_virtual.rst | ||
l3_forward.rst | ||
link_status_intr.rst | ||
load_balancer.rst | ||
multi_process.rst | ||
netmap_compatibility.rst | ||
packet_ordering.rst | ||
pdump.rst | ||
performance_thread.rst | ||
proc_info.rst | ||
ptpclient.rst | ||
qos_metering.rst | ||
qos_scheduler.rst | ||
quota_watermark.rst | ||
rxtx_callbacks.rst | ||
skeleton.rst | ||
tep_termination.rst | ||
test_pipeline.rst | ||
timer.rst | ||
vhost.rst | ||
vm_power_management.rst | ||
vmdq_dcb_forwarding.rst |