path: root/lib/librte_ivshmem
AgeCommit message (Collapse)Author
2016-07-01ivshmem: fix for modified mempool structFerruh Yigit
struct rte_mempool changed its "ring" field to "pool_data" "ring" field is accessed by ivshmem library, and updated to "pool_data" This patch fixes the compile error: lib/librte_ivshmem/rte_ivshmem.c: In function 'add_mempool_to_metadata': lib/librte_ivshmem/rte_ivshmem.c:584:32: error: 'const struct rte_mempool' has no member named 'ring' return add_ring_to_metadata(mp->ring, config); ^~ Fixes: 449c49b93a6b ("mempool: support handler operations") Signed-off-by: Ferruh Yigit <> Acked-by: David Hunt <>
2016-06-10eal: remove useless includes of mempool and ringThomas Monjalon
The libraries rte_mempool and rte_ring are not used in EAL, except for the ivshmem part (CONFIG_RTE_LIBRTE_IVSHMEM). Signed-off-by: Thomas Monjalon <> Acked-by: David Marchand <>
2016-06-07ivshmem: add all memzones of mempool to metadataFerruh Yigit
Mempool consist of multiple memzones, at least from two of them. ivshmem assumes mempool and elements are all in same memzone. Updating code to add all memzones when a mempool added. Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default") Signed-off-by: Ferruh Yigit <> Acked-by: Anatoly Burakov <> Acked-by: Olivier Matz <>
2016-04-01ivshmem: fix race conditionMauricio Vasquez B
The memory zone could be freed just after adding it to the metadata file and just before marking it as not freeable. This patch changes the locking logic in order to prevent it. Fixes: cd10c42eb5bc ("mem: fix ivshmem freeing") Signed-off-by: Mauricio Vasquez B <> Acked-by: Anatoly Burakov <>
2015-08-09mem: fix ivshmem freeingSergio Gonzalez Monroy
There is no sync between host and guest to allow removal of memzones, and freeing them result in undefined behavior. In the guest, we identify IVSHMEM memsegs/memzones by having ioremap_addr != 0. In the host, nothing is done to the memzone, meaning ioremap_addr == 0. As a solution, mark memzones being added to IVSHMEM in the host, by setting ioremap_addr, then return an error whenever we try to free an IVSHMEM memzone. Fixes: ff909fe21f0 ("mem: introduce memzone freeing") Signed-off-by: Sergio Gonzalez Monroy <>
2015-06-22ivshmem: fix crash in corner caseSergio Gonzalez Monroy
Depending on the configured segments it is possible to hit a segmentation fault as a result of decrementing an unsigned index with value 0. To avoid it, exit the loop if the index has value 0. Fixes: 40b966a211ab ("ivshmem: library changes for mmaping using ivshmem") Signed-off-by: Sergio Gonzalez Monroy <>
2015-02-03mk: add library version extensionNeil Horman
To differentiate libraries that break ABI, we add a library version number suffix to the library, which must be incremented when a given libraries ABI is broken. This patch enforces that addition, sets the initial abi soname extension to 1 for each library and creates a symlink to the base SONAME so that the test applications will link properly. Signed-off-by: Neil Horman <> Acked-by: Sergio Gonzalez Monroy <>
2015-02-03lib: provide initial versioningNeil Horman
Add linker version script files to each DPDK library to put a stake in the ground from which we can start cleaning up API's Signed-off-by: Neil Horman <> Acked-by: Sergio Gonzalez Monroy <>
2014-06-27eal: deprecate rte_snprintfStephen Hemminger
The function rte_snprintf serves no useful purpose. It is the same as snprintf() for all valid inputs. Deprecate it and replace all uses in current code. Leave the tests for the deprecated function in place. Signed-off-by: Stephen Hemminger <> Acked-by: Thomas Monjalon <>
2014-06-27eal: fix usage of printf-like functionsBruce Richardson
Mark the rte_log, cmdline_printf and rte_snprintf functions as being printf-style functions. This causes compilation errors due to mis-matched parameter types, so the parameter types are fixed where appropriate. Signed-off-by: Bruce Richardson <> Acked-by: Thomas Monjalon <>
2014-06-11remove trailing whitespacesBruce Richardson
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [hence the number of files reporting 8 lines changed in the diffstat]. Signed-off-by: Bruce Richardson <> Acked-by: Neil Horman <> [Thomas: remove spaces before tabs in libs] [Thomas: remove more trailing spaces in non-C files] Signed-off-by: Thomas Monjalon <>
2014-05-19ivshmem: fix buildOlivier Matz
Fix compilation error introduced by: e5ac7c2ff367edd eal: don't inline string functions The stdio.h include is missing due to its removing from rte_string_fns.h. Signed-off-by: Olivier Matz <> Acked-by: Thomas Monjalon <>
2014-05-16add FILE argument to debug functionsStephen Hemminger
The DPDK dump functions are useful for remote debugging of an applications. But when application runs as a daemon, stdout is typically routed to /dev/null. Instead change all these functions to take a stdio FILE * handle instead. An application can then use open_memstream() to capture the output. Signed-off-by: Stephen Hemminger <> [Thomas: fix quota_watermark example] Acked-by: Thomas Monjalon <>
2014-02-25ivshmem: library changes for mmaping using ivshmemBruce Richardson
These library changes provide a new Intel DPDK feature for communicating with virtual machines using QEMU's IVSHMEM mechanism. The feature works by providing a command line for QEMU to map several hugepages into a single IVSHMEM device. For the guest to know what is inside any given IVSHMEM device (and to distinguish between Intel(R) DPDK and non-Intel(R) DPDK IVSHMEM devices), a metadata file is also mapped into the IVSHMEM segment. No work needs to be done by the guest application to map IVSHMEM devices into memory; they are automatically recognized by the Intel(R) DPDK Environment Abstraction Layer (EAL). Changes in this patch: * Changes to EAL to allow mapping of all hugepages in a memseg into a single file * Changes to EAL to allow ivshmem devices to be transparently mapped in the process running on the guest. * New ivshmem library to create and manage metadata exported to guest VM's * New ivshmem compilation targets * Mempool and ring changes to allow export of structures to a VM and allow a VM to attach to those structures. * New autotests to unit tests this functionality. Signed-off-by: Bruce Richardson <>