aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/virtio/vhost-user.h
AgeCommit message (Collapse)AuthorFilesLines
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-350/+0
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-06vhost: Improve data pathPierre Pfister1-1/+29
This patch significantly improves vhost Tx and Rx performance (20% Mpps improvement in PVP scenario). Most significant change consists in the split of virtio ring parsing and memory copies. Other minor changes mostly consist in getting rid of unnecessary variables. Change-Id: Ia94e12ab9a6c114e3f7fef376a9343823d051209 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-12-06vhost: Code cleaningPierre Pfister1-12/+6
After a bug was found, I decided to review old vhost code. This change cleans some of it by: - Use unix file private data rather than hash table - Use vnet interface lookups rather than hash table - Keep track of unix_fd index rather than fd value - Change some indent - Store interfaces in a clib pool rather than hand-made pool The overall change reduces the number of lines as well as the amount of state kept in vhost structures. Change-Id: I6b9b670b9c7e1fb85981bcf2099f7140b0251fe0 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-23dpdk: remove rte_mbuf modifications at many places in the codeDamjan Marion1-4/+0
It is sole responsibility of dpdk tx function to fill/update rte_mbuf prior to sending packet do PMD. Change-Id: I8ca1dba3e7bef41034d36e3525831849f7ac4ac0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-11-08vhost: Improve packet tracingPierre Pfister1-1/+0
Packet tracing for packets sent or received on vhost interfaces now includes: - virtio header information - virtio queue transmit mode (chained, indirect, etc...) Should be *really* helpful for dealing with the many existing qemu/driver versions/implementations. Change-Id: Id0a5d1d671d8b9d3e05691fe13def991b30ee105 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-11-04vhost-user: multiqueue supportPierre Pfister1-25/+60
This patch adds multi-queue support to non-dpdk's vhost-user driver. Waiting for a unified way to manage threads, this patch defines a way to assign threads to interfaces that is specific to vhost. Change-Id: I86298788b1a4e886c5431f187dc17175d12c7a8b Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-10-26dpdk: remove support for dpdk 2.2Damjan Marion1-4/+0
Change-Id: I2d1a7063f3776a9070e75a627beb5d0e45a67874 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-22vhost-user: branchless SSE4.2 implementation of map_guest_mem()Damjan Marion1-0/+2
Change-Id: I64349830c1f7534a8d090572e9473c51c0818e51 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-22vhost-user: remove dependency on dpdk codeDamjan Marion1-0/+6
Change-Id: I48908e0fa010570aefc43dd552ee81ee69fc2796 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20vhost-user: announce VIRTIO_F_VERSION_1Damjan Marion1-1/+2
On some setups with QEMU 2.7.0 and xenial guests following error message is reported in guest dmesg: [ 0.895944] virtio_net virtio3: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1 Change-Id: I5a0b3beffe75c9b0344d377098d94923b2ad7ae9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-07Vhost-User: Implement Indirect DescriptorsPierre Pfister1-0/+2
One of the main issue with virtio is the small queue size. VPP can quickly fill the queue before Linux could empty it, resulting in packet losses. Virtio indirect descriptors double the number of packet which may fit in the virtio queue (From 128 to 256 with standard qemu which hardcodes queue size to 256). Linux will not use such descriptors if the virtio MRG feature is enabled. You may add mrg_rxbuff=off option to qemu commandline when starting the VM such as to disable this feature. This way, Linux will use indirect buffers to receive packets. But it seems that Linux never uses indirect buffers to send packets. This patch also includes some optimization modifications. Change-Id: I26940d41ce6b7e3a08d5516018a8c46c5316ce1c Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-08-25Fix issues with vhost-user when dpdk vhost-user is disabled, fixes VPP-347, ↵Damjan Marion1-0/+4
VPP-349 Change-Id: I774bab98e43d55678a67a7708ca50edbbd4cbb06 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-17Coding standards cleanup in vnet/vnet/devices, fixes VPP-248Damjan Marion1-72/+97
Change-Id: I35cf89bf1aa54b76294876e9feb0ed0ccc316975 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-07Retire support for DPDK 2.1.0 and olderDamjan Marion1-4/+0
Change-Id: I3c3427c61e32d4727360aa802950bb9ab44afd84 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-27Live VM migration support for vhost-userShesha Sreenivasamurthy1-0/+5
Change-Id: I79bef6dc94b3ad688564a409d14d63ca3125a305 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-03-29Add DPDK 16.04-rc2 supportDamjan Marion1-2/+2
Can be used by specifying DPDK_VERSION=16.04-rc2 in the make command line Change-Id: I657b44d7ca22f1ef57756e7703088020fab12bc6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14Better match vhost-user specification for live migrationYoann Desmouceaux1-0/+2
The specification requires logging of used vring writes to only happen when VHOST_VRING_F_LOG flag is present in VHOST_USER_SET_VRING_ADDR message; take that into account. Change-Id: I9bf4b9eb43a1783b39909b1a3ea1a3bdf50d91a8 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-02-25Add live migration support to (non-dpdk) vhost-user driverYoann Desmouceaux1-4/+22
This patch adds live migration support to vhost interfaces, by supporting the VHOST_F_LOG_ALL feature. When qemu starts a migration, it will negotiate this feature, and provide a fd for a "dirty log" shared mem space. This log is a bitmap representing pages in the device memory. Whenever we touch memory pointed by a "desc" vring, or modify a "used" vring, we log the corresponding page in the bitmap. This allows qemu to send the dirty page to the destination host. See https://github.com/qemu/qemu/blob/master/docs/specs/vhost-user.txt, § "Live migration" for more details. In addition to this, this code provides support for the VHOST_USER_F_PROTOCOL_FEATURES feature, and to VHOST_USER_{GET,SET}_PROTOCOL_FEATURES and VHOST_USER_SET_VRING_ENABLE messages, required for live migration. Change-Id: I7577efce8bd67653218f4291af1d651de451e552 Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-02-24Enable all vrings if PROTOCOL_FEATURES are not negotiatedShesha Sreenivasamurthy1-0/+1
Change-Id: Ib785a2ffd2fcbe3a836dd59ad419bcc2fa298686 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-19Add custom mac address option to vhost interfaces.Pierre Pfister1-1/+1
Generating a new MAC address everytime vpp reboots can quickly become cumbersome (e.g. in test scenarios). This commit allows vhost mac addresses to be configured manually. Change-Id: Ic6d16a2d14cdf8e49dc29041bbafde39d9fc8370 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-02-10Vhost multi-q supportShesha Sreenivasamurthy1-0/+18
Remove multi-q support patch for DPDK-2.1.0 Change-Id: I685f3886b3883803210221682fa80353670a6970 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke1-0/+222
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>