cmake: specify missing settings for dpdk

* after upgrading to gcc-8, seems dpdk requires more settings to compile.
  in which, CONFIG_RTE_MAX_VFIO_GROUPS=64 is copied from config/common_base.
* librte_bus_pci.a depends on librte_pci.a, so reorder the libraries
  in DPDK_LIBRARIES.

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2018-05-06 14:32:45 +08:00
parent 7bd7559ece
commit 19230378c8
2 changed files with 7 additions and 2 deletions

View File

@ -71,7 +71,7 @@ function(do_build_dpdk dpdk_dir)
BUILD_IN_SOURCE 1
INSTALL_COMMAND "true")
ExternalProject_Add_Step(dpdk-ext patch-config
COMMAND ${CMAKE_MODULE_PATH}/patch-dpdk-conf.sh ${dpdk_dir} ${machine}
COMMAND ${CMAKE_MODULE_PATH}/patch-dpdk-conf.sh ${dpdk_dir} ${machine} ${arch}
DEPENDEES configure
DEPENDERS build)
# easier to adjust the config
@ -86,7 +86,7 @@ macro(build_dpdk)
# target
file(MAKE_DIRECTORY ${DPDK_INCLUDE_DIR})
foreach(c
pci bus_pci
bus_pci pci
eal
mempool mempool_ring mempool_stack ring)
add_library(dpdk::${c} STATIC IMPORTED)

View File

@ -15,8 +15,12 @@ conf=$1/.config
shift
machine=$1
shift
arch=$1
shift
setconf CONFIG_RTE_MACHINE "${machine}"
setconf CONFIG_RTE_ARCH "${arch}"
# Disable experimental features
setconf CONFIG_RTE_NEXT_ABI n
setconf CONFIG_RTE_LIBRTE_MBUF_OFFLOAD n
@ -38,6 +42,7 @@ setconf CONFIG_RTE_LIBRTE_VHOST_NUMA n
setconf CONFIG_RTE_LIBRTE_VMXNET3_PMD n
setconf CONFIG_RTE_LIBRTE_PMD_VHOST n
setconf CONFIG_RTE_APP_EVENTDEV n
setconf CONFIG_RTE_MAX_VFIO_GROUPS 64
# no test
setconf CONFIG_RTE_APP_TEST n