aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-11-06 15:40:21 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-11-06 17:36:42 +0000
commit4d11b6cecaa9c1be20aa149bc8779f197f6393ed (patch)
tree860f2d0ba74f41de1b637944a2c54ee942c91df8 /src
parent6b0dd5502489c83cc4a0e6e9240b41a9bb3f0ed6 (diff)
dpdk: conditionally revert rte_vfio_dma_map patch
DPDK have bug which will be fixed in 19.11. Type: fix Change-Id: I6c0058928e5991d61b3c5fcba706f35e6886b0f2 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c
index d691f9d205c..fdd5cbd5c55 100644
--- a/src/plugins/dpdk/buffer.c
+++ b/src/plugins/dpdk/buffer.c
@@ -20,6 +20,7 @@
#include <rte_mbuf.h>
#include <rte_ethdev.h>
#include <rte_vfio.h>
+#include <rte_version.h>
#include <vlib/vlib.h>
#include <dpdk/buffer.h>
@@ -150,8 +151,12 @@ dpdk_buffer_pool_init (vlib_main_t * vm, vlib_buffer_pool_t * bp)
pointer_to_uword (va) : pm->page_table[i];
if (do_vfio_map &&
+#if RTE_VERSION < RTE_VERSION_NUM(19, 11, 0, 0)
+ rte_vfio_dma_map (pointer_to_uword (va), pa, page_sz))
+#else
rte_vfio_container_dma_map (RTE_VFIO_DEFAULT_CONTAINER_FD,
pointer_to_uword (va), pa, page_sz))
+#endif
do_vfio_map = 0;
struct rte_mempool_memhdr *memhdr;