summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/dpdk/vhost_user.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-26dpdk: remove support for dpdk 16.04Damjan Marion1-2140/+0
This also removes old DPDK vhost-user code which doesn't help much with DPDK 16.07 or newer. Change-Id: Ic996df1eaccc33acd3fa6cabeaf7381a672c2a90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-26dpdk: remove support for dpdk 2.2Damjan Marion1-15/+0
Change-Id: I2d1a7063f3776a9070e75a627beb5d0e45a67874 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-10-13vpp_lite: add cpu pinning support (VPP-467)Pavel Kotucek1-1/+1
Proper cpu pinning in vpp_lite platform, like in normal vpp image. Extended “show threads” command to show propper information. Changed handling of coreID and socketID for threads in "show threads" CLI, pthread_getaffinity is used instead of info stored in DPDK. Change-Id: Ic8299ec5e284472bb10a37a95fadeed57b6edae8 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-09-23Fix eventfd leakage issue in vhost-user modeSteve Shin1-3/+37
The leakage happens on the file descriptors for kickfd and vring's callfd. Those file descriptors should be closed when vhost-interface is disconnected. Change-Id: I12453b0c3eac037a1dc040a001465059b8f672c2 Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-09-21dpdk: fix wrong tx ring size calculationsDamjan Marion1-2/+2
At many places code was using constant ring size od 4096 which was defined in macro DPDK_TX_RING_SIZE. As we support differnet ring size and default value s now 1024, we need to remove DPDK_TX_RING_SIZE and use value stored in device structure. For that reason dpdk_device_t.nb_tx_desc is moved to first cacheline. Change-Id: I2c2ac11f0f5e8ae779d34f9a9104eaf2921ec34c Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-09-20dpdk: use flags for identifying interface typesDamjan Marion1-5/+5
This will allow us to handle some more complex situations like in case when hqos needs to be enabled only for some PMDs. Change-Id: I5421a8d4cf29b8394b9e956cc4e39737dd07dbbb Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-25Fix issues with vhost-user when dpdk vhost-user is disabled, fixes VPP-347, ↵Damjan Marion1-1/+13
VPP-349 Change-Id: I774bab98e43d55678a67a7708ca50edbbd4cbb06 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-19vhost-user: unmap previously configured memory if necessarySteve Shin1-0/+3
If there's any memory-mapped region configued previously, it should be unmapped before setting up a new vhost memory table. Otherwise, huge page leakage will happen. Change-Id: I375f603ea303919f1502df44a26a7384ab2ea00e Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-08-16Coding standards cleanup in vnet/vnet/devices/dpdk, partially fixes VPP-248Damjan Marion1-943/+1132
Change-Id: Ie3ee4ccc126c5db9020779cbd06b0d1da99c8411 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-08-15Vhost-User: Fix calculate memory region sizeJianfeng Tan1-3/+3
The memory region size calculation is wrong. For example, a region with size of 1G (hugepage size is also 1G), and offset is zero, use the previous way to calculate, the ultimate size to mmap and munmap is 2G, which could lead to segment fault when munmap is executed. This patch refers the way in DPDK to calculate the region size. Change-Id: I6f35cde15e2402be0025c556c192b87a46bbf978 Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
2016-07-30Remove per-worker destination frame queueDamjan Marion1-3/+0
This frame queue is not part of the dpdk code anymore, so it can be removed. It will save some space in the 1st cacelineof dpdk device data struct. Change-Id: If839861961548750601400a511a609be7ae84b30 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-27Vhost-User: Fix bind sockaddr lengthPierre Pfister1-5/+3
The sockaddr length argument provided to bind was wrong. This patch also adds an error message in the CLI when the vhost-user add function fails. Change-Id: Ib4466accffe49c8c3f4951ebf3a83a24529f6a5b Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-07-22Add DPDK 16.07 support (rc3 based)Damjan Marion1-0/+3
DPDK vhost-user support is disabled due to significan changes in the DPDK vhost-user code which are not compatible with current VPP code. Change-Id: I3f0d28cb75f6370282ec7e33d57cbfb77e1a3ce1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-14vhost-user: Reset virt-queue info when a vhost interface is disconnected.Steve Shin1-0/+16
When a vhost interface is disconneted, virt-queue info should be cleaned up. This will avoid any potential vpp crash due to unmmaped memory access. Change-Id: Ia20153da9eb45412bb41d76ef66ede175ea6fef1 Signed-off-by: Steve Shin <jonshin@cisco.com>
2016-07-07Retire support for DPDK 2.1.0 and olderDamjan Marion1-53/+0
Change-Id: I3c3427c61e32d4727360aa802950bb9ab44afd84 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-01VPP-171: fix a set of hw interface recycling bugsDave Barach1-1/+1
Change-Id: I735292bb2176742acab2295f90956c57e6f7ec1c Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-16Fix hugepage leak on VM terminationShesha Sreenivasamurthy1-0/+35
When VM is terminated, the hugepages mapped should be unmapped so that the system does not run out of hugepage resources. Therefore, mapped pages are unmapped when VPP notices a disconnect. Change-Id: I7398fb20028036738ab87db0b0e79609e95d69a4 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-14Retire io threads and main-thread-io modeDamjan Marion1-4/+1
Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-05Add per-device startup config supportDamjan Marion1-1/+1
This change adds support for providing per-interface parameters in the startup config. Sample configuration: dpdk { dev default { num-rx-queues 3 num-tx-queues 3 } dev 0000:02:00.0 { num-rx-queues 2 num-tx-queues 2 } dev 0000:02:00.1 } Change-Id: Ia7d9ae2ac9c4fd9baaa480d061a395f8a421a722 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-31VPP-102: vHost reconnect to previously used sockets on VPP restartJohn Lo1-0/+8
Change-Id: Ida11bddb52268e0e8513b7b379eeed6103bd48f1 Signed-off-by: John Lo <loj@cisco.com>
2016-05-25Move dpdk startup config data to separate structDamjan Marion1-10/+10
This is preparation work for moving DPDK EAL and mempool initialization to vlib. Change-Id: I2dc35aa53edec0e07fc2650d630aa625831154c3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-23VPP-81: Print interface name after creating an interface with CLIPierre Pfister1-0/+1
When the CLI is used to create an interface, and whend the operation succeeds, the newly created interface name is printed-out. The patch includes the following interfaces types: - AF_PACKET - Vhost User - Netmap - GRE - L2TP - MPLS-GRE - Loopback Change-Id: Id518c139ec63a261eae81d2ed95c4cd1f10b5157 Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-05-17dpdk/build - 32bits compilationChristophe Fontaine1-9/+9
In vnet/vnet/devices/dpdk/device.c, post 2 event data instead of merging them into 1 u64. Change-Id: I8b1d61b894279fb6eb57bb82a05affc14360e6b8 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-04-29Improve performance of dpdk-vhost driverShesha Sreenivasamurthy1-0/+9
By setting the flag in used table, guest is prevented from kicking the host when it adds buffers. This results in 100% performance improvement when tested throughput using iperf3. Change-Id: Iefaf5b97d1444c216bb373998732a437d333d521 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-27Live VM migration support for vhost-userShesha Sreenivasamurthy1-4/+58
Change-Id: I79bef6dc94b3ad688564a409d14d63ca3125a305 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-25Disable TSO/CSUM offloadingShesha Sreenivasamurthy1-0/+15
Enabling these features breaks L4 traffic when a VHOST interface is bridged with a hardware interface which does not support such offloading. (Eg: enic) Change-Id: Ife3d292a8860eb60b82f1473e2d0dd7329e51d5e Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion1-3/+3
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-18Add support for AArch32Christophe Fontaine1-2/+2
gcc version 4.9.2 (Raspbian 4.9.2-10) Tested on Linux raspberrypi 4.4.6-v7+ #875 SMP Tue Apr 12 16:33:02 BST 2016 armv7l GNU/Linux CPUs may be little or big endian, detect with gcc flags, not the processor architecture Add a new flag $(PLATFORM)_uses_openssl which allows to disable the link with openssl lib. vlib/vlib/threads.c: startup.conf must: - specify the heapsize as we don't have hugepages on raspbian cpu { main-core 3 } heapsize 64M Corrects in various files the assumption uword == u64 and replaces 'u64' cast with 'pointer_to_uword' and 'uword_to_pointer' where appropriate. 256 CPUs may create an OOM when testing with small memory footprint ( heapsize 64M ), allows the number of VLIB_MAX_CPUS to be set in platforms/*.mk vppinfra/vppinfra/longjmp.S: ARM - copy r1 (1st parameter of the setjmp call) to r0 (return value) vppinfra/vppinfra/time.h: On ARMv7 in AArch32 mode, we can access to a 64bit register to retreive the cycles count. gcc on rpi only declare ARM_ARCH 6. Override this info, and check if it is possible to use 'mrrc'. /!\ the time function will NOT work without allowing the user mode access to the PMU. You may download the source of the kmod here: https://github.com/christophefontaine/arm_rdtsc Change-Id: I8142606436d9671a184133b935398427f08a8bd2 Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-03-04Collect per Q stats for vhost-user interfaceShesha Sreenivasamurthy1-4/+8
Change-Id: I394960c300ff7a81c4c8e05afd5a4175e66666eb Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-24Enable all vrings if PROTOCOL_FEATURES are not negotiatedShesha Sreenivasamurthy1-5/+22
Change-Id: Ib785a2ffd2fcbe3a836dd59ad419bcc2fa298686 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-24Handle dynamic enable/disable VHOST_USER interfaceShesha Sreenivasamurthy1-6/+14
If number of Qs enabled by the guest is less than number of Qs exported to guest, then all threads route packet to Q0 with the assumption that guest is not interested in performance. If all Qs are enabled, each thread queues packet in their own TX-Q of the VHOST_USER interface, boosting performance. Change-Id: Ic24bb8c0505b11c7513aeecd21c9ec5da5f90138 Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-02-23Fix warnings in vhost-user code with older version of DPDKDamjan Marion1-1/+5
Change-Id: If76ef977e3914b51da0d6bb5e4089acb0bd67baa Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-19Add custom mac address option to vhost interfaces.Pierre Pfister1-6/+15
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-14Implement multiple TX queue sharingDamjan Marion1-9/+6
Maximum number of TX queues ca be defined by NIC driver or configured manualy with 'dpdk { max-tx-queues X }'. If system have more worker threads than TX queues they will be shared between them. Before this change only one tx queue was used in such cases. Change-Id: Iab68170ab45fa6b9925fc4e79ccab9222f095e7e Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-02-10Compile with -Werror, so Jenkins will catch warningsDave Barach1-1/+1
Change-Id: I9255c75b6c6cbc638cdcc411632a924cb06f28c0 Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-10Replace AC_PROG_LIBTOOL with LT_INITDave Barach1-1/+1
Change-Id: I642c4b8e83dd07708658a10ad46e9fd2c28a7f1f Signed-off-by: Dave Barach <dave@barachs.net>
2016-02-10Vhost multi-q supportShesha Sreenivasamurthy1-100/+348
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/+1550
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>