]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: specify missing settings for dpdk
authorKefu Chai <kchai@redhat.com>
Sun, 6 May 2018 06:32:45 +0000 (14:32 +0800)
committerCasey Bodley <cbodley@redhat.com>
Mon, 7 May 2018 19:34:57 +0000 (15:34 -0400)
* 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>
(cherry picked from commit 19230378c8309e8c24ee81ae255de4b3d80b24f2)

cmake/modules/BuildDPDK.cmake
cmake/modules/patch-dpdk-conf.sh

index 03d141edfaf1ffca4b4f78b22d282769e869ae37..ea60857733640865ff3a2aecbdc9fe420cb5ba81 100644 (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)
index 57c2da7932dc8325e1604ce00d72ec2b4f097664..8da0ac293f0fc6aca97cec5ea9873b3334f19eb0 100755 (executable)
@@ -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