+##############################################################################
+# libnuma
+##############################################################################
+vpp_plugin_find_library(dpdk NUMA_LIB "numa")
+list(APPEND DPDK_LINK_LIBRARIES ${NUMA_LIB})
+
+##############################################################################
+# AESNI libraries
+##############################################################################
+if(DPDK_RTE_LIBRTE_PMD_AESNI_MB OR DPDK_RTE_LIBRTE_PMD_AESNI_GCM)
+ if(DPDK_IS_SHARED_LIB)
+ vpp_plugin_find_library(dpdk IPSECMB_LIB "libIPSec_MB.so")
+ list(APPEND DPDK_LINK_LIBRARIES "${IPSECMB_LIB}")
+ else()
+ vpp_plugin_find_library(dpdk IPSECMB_LIB "libIPSec_MB.a")
+ get_filename_component(IPSECMB_LIB_DIR ${IPSECMB_LIB} DIRECTORY)
+ string_append(DPDK_LINK_FLAGS "-L${IPSECMB_LIB_DIR}")
+ string_append(DPDK_LINK_FLAGS "-Wl,--exclude-libs,libIPSec_MB.a,-l:libIPSec_MB.a")
+ endif()
+endif()
+
+##############################################################################
+# Mellanox libraries
+##############################################################################
+if(DPDK_RTE_LIBRTE_MLX4_PMD OR DPDK_RTE_LIBRTE_MLX5_PMD)
+ vpp_plugin_find_library(dpdk MNL_LIB "mnl")
+ list(APPEND DPDK_LINK_LIBRARIES "${MNL_LIB}")
+ if (DPDK_RTE_IBVERBS_LINK_DLOPEN)
+ message(STATUS "DPDK depends on libmnl (Mellanox PMD requirement)")
+ else()
+ message(WARNING "unsupported DPDK configuration: DPDK Mellanox PMD requires RTE_IBVERBS_LINK_DLOPEN")
+ endif()
+endif()
+
+##############################################################################
+# DPDK plugin
+##############################################################################
+add_vpp_plugin(dpdk
+ SOURCES
+ buffer.c
+ main.c
+ thread.c
+# api/dpdk_api.c
+# api/dpdk_test.c
+ device/cli.c
+ device/common.c
+ device/device.c
+ device/flow.c
+ device/format.c
+ device/init.c
+ device/node.c
+# hqos/hqos.c
+ ipsec/cli.c
+ ipsec/crypto_node.c
+ ipsec/esp_decrypt.c
+ ipsec/esp_encrypt.c
+ ipsec/ipsec.c
+
+ MULTIARCH_SOURCES
+ buffer.c
+ device/device.c
+ device/node.c
+ ipsec/crypto_node.c
+ ipsec/esp_decrypt.c
+ ipsec/esp_encrypt.c
+
+# API_FILES
+# api/dpdk.api
+
+# API_TEST_SOURCES
+# api/dpdk_test.c
+
+ INSTALL_HEADERS
+ device/dpdk.h
+ ipsec/ipsec.h
+
+ LINK_FLAGS
+ "${DPDK_LINK_FLAGS}"
+
+ LINK_LIBRARIES
+ ${DPDK_LINK_LIBRARIES}
+
+ COMPONENT
+ vpp-plugin-dpdk
+)
+