crypto: Enabling IOMMU DMA translation table update for QAT card 34/35634/2
authorGovindarajan <govindarajan.mohandoss@arm.com>
Fri, 11 Mar 2022 18:43:59 +0000 (18:43 +0000)
committerDamjan Marion <dmarion@me.com>
Mon, 14 Mar 2022 19:58:03 +0000 (19:58 +0000)
With DPDK plugin, VPP does the DMA page map in IOMMU, only when
DPDK supported ethernet devices are present. As a result, Mellanox NIC
and QAT combo doesn't work. As part of this fix, DPDK supported
crypto device check is added to do the DMA page map.

Type: fix
Signed-off-by: mgovind <govindarajan.mohandoss@arm.com>
Change-Id: I02de4588c5b021e0c9c62612137f28ed8784bea6

src/plugins/dpdk/buffer.c

index 9718451..e4d9e72 100644 (file)
@@ -19,6 +19,7 @@
 #include <rte_config.h>
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
+#include <rte_cryptodev.h>
 #include <rte_vfio.h>
 #include <rte_version.h>
 
@@ -135,7 +136,7 @@ dpdk_buffer_pool_init (vlib_main_t * vm, vlib_buffer_pool_t * bp)
     }
 
   /* map DMA pages if at least one physical device exists */
-  if (rte_eth_dev_count_avail ())
+  if (rte_eth_dev_count_avail () || rte_cryptodev_count ())
     {
       uword i;
       size_t page_sz;