dpdk: fix mlx4 mlx5 detection in plugin build
[vpp.git] / src / plugins / dpdk / CMakeLists.txt
index 7db6b09..8650841 100644 (file)
@@ -20,6 +20,7 @@ if(VPP_USE_SYSTEM_DPDK)
     pkg_check_modules(DPDK REQUIRED libdpdk)
     message(WARNING "-- linking dpdk plugin against system libdpdk, version ${DPDK_VERSION}")
     set(DPDK_LINK_FLAGS ${DPDK_LDFLAGS})
+    include_directories (${DPDK_INCLUDE_DIRS})
 else()
     ##############################################################################
     # Find lib and include files
@@ -95,7 +96,7 @@ else()
     ##############################################################################
     # Mellanox libraries
     ##############################################################################
-    if(DPDK_RTE_LIBRTE_MLX4_PMD OR DPDK_RTE_LIBRTE_MLX5_PMD)
+    if(DPDK_RTE_NET_MLX4 OR DPDK_RTE_NET_MLX5)
       if (DPDK_RTE_IBVERBS_LINK_DLOPEN)
         message(STATUS "DPDK depends on libmnl (Mellanox PMD requirement)")
         vpp_plugin_find_library(dpdk MNL_LIB "mnl")
@@ -117,9 +118,7 @@ endif()
 ##############################################################################
 
 if (${DPDK_VERSION} VERSION_GREATER_EQUAL "20.8.0")
-  set(DPDK_CRYPTODEV_SOURCE cryptodev_dp_api)
-else ()
-  set(DPDK_CRYPTODEV_SOURCE cryptodev)
+  set(DPDK_CRYPTODEV_RAW_SOURCE cryptodev/cryptodev_raw_data_path.c)
 endif ()
 
 add_vpp_plugin(dpdk
@@ -134,24 +133,17 @@ add_vpp_plugin(dpdk
   device/format.c
   device/init.c
   device/node.c
-  ipsec/cli.c
-  ipsec/crypto_node.c
-  ipsec/esp_decrypt.c
-  ipsec/esp_encrypt.c
-  ipsec/ipsec.c
-  cryptodev/${DPDK_CRYPTODEV_SOURCE}.c
+  cryptodev/cryptodev_op_data_path.c
+  cryptodev/cryptodev.c
+  ${DPDK_CRYPTODEV_RAW_SOURCE}
 
   MULTIARCH_SOURCES
   buffer.c
   device/device.c
   device/node.c
-  ipsec/crypto_node.c
-  ipsec/esp_decrypt.c
-  ipsec/esp_encrypt.c
 
   INSTALL_HEADERS
   device/dpdk.h
-  ipsec/ipsec.h
 
   LINK_FLAGS
   "${DPDK_LINK_FLAGS}"