]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake,rpm,deb: update to accommodate SPDK v17.10 19208/head
authorKefu Chai <kchai@redhat.com>
Tue, 28 Nov 2017 10:00:37 +0000 (18:00 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 29 Nov 2017 10:03:23 +0000 (18:03 +0800)
* cmake/modules/BuildSPDK.cmake: add lvol
* cmake/modules/BuildDPDK.cmake: add pci and bus_pci
* ceph.spec.in, cmake/modules/BuildSPDK.cmake, debian/control:
  re-introduce libuuid dependency, as 17.07 added lvol. and the latter
  depends on uuid.
* cmake/modules/BuildSPDK.cmake: avoid introducing local variable of
  `iface_libs`.
* cmake/modules/patch-dpdk-conf.sh: disable
  CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES, this option introduces the
  balanced allocation of memory. but it also requires libnuma-dev.
  let's disable it for now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph.spec.in
cmake/modules/BuildDPDK.cmake
cmake/modules/BuildSPDK.cmake
cmake/modules/Finddpdk.cmake
cmake/modules/Finduuid.cmake [new file with mode: 0644]
cmake/modules/patch-dpdk-conf.sh
debian/control

index 424bd8f76737d771810b1e98c2ecc27334320e86..82bb63aacc6624d695325e675c9dfb31a734c921 100644 (file)
@@ -132,6 +132,7 @@ BuildRequires:      libcurl-devel
 BuildRequires: libudev-devel
 BuildRequires: libtool
 BuildRequires: libxml2-devel
+BuildRequires: libuuid-devel
 BuildRequires: make
 BuildRequires: parted
 BuildRequires: perl
index 8b28cf97ced7ca9b442919e207f8541723f9167c..03d141edfaf1ffca4b4f78b22d282769e869ae37 100644 (file)
@@ -85,7 +85,10 @@ macro(build_dpdk)
   # create the directory so cmake won't complain when looking at the imported
   # target
   file(MAKE_DIRECTORY ${DPDK_INCLUDE_DIR})
-  foreach(c eal mempool mempool_ring mempool_stack ring)
+  foreach(c
+      pci bus_pci
+      eal
+      mempool mempool_ring mempool_stack ring)
     add_library(dpdk::${c} STATIC IMPORTED)
     add_dependencies(dpdk::${c} dpdk-ext)
     set(dpdk_${c}_LIBRARY
index c4aca7804cc6320356ad5bc4ab0e65bb4413648e..348071228f011ec7b8e8a64e66d2a29683ccfb27 100644 (file)
@@ -6,6 +6,7 @@ macro(build_spdk)
   find_package(CUnit REQUIRED)
   if(LINUX)
     find_package(aio REQUIRED)
+    find_package(uuid REQUIRED)
   endif()
   include(ExternalProject)
   ExternalProject_Add(spdk-ext
@@ -19,7 +20,7 @@ macro(build_spdk)
     BUILD_IN_SOURCE 1
     INSTALL_COMMAND "true")
   ExternalProject_Get_Property(spdk-ext source_dir)
-  foreach(c nvme log env_dpdk util)
+  foreach(c nvme log lvol env_dpdk util)
     add_library(spdk::${c} STATIC IMPORTED)
     add_dependencies(spdk::${c} spdk-ext)
     set_target_properties(spdk::${c} PROPERTIES
@@ -27,10 +28,12 @@ macro(build_spdk)
       INTERFACE_INCLUDE_DIRECTORIES "${source_dir}/include")
     list(APPEND SPDK_LIBRARIES spdk::${c})
   endforeach()
-  list(APPEND iface_libs ${DPDK_LIBRARIES} rt)
   set_target_properties(spdk::env_dpdk PROPERTIES
-    INTERFACE_LINK_LIBRARIES "${iface_libs}")
+    INTERFACE_LINK_LIBRARIES "${DPDK_LIBRARIES};rt")
+  if(LINUX)
+    set_target_properties(spdk::lvol PROPERTIES
+      INTERFACE_LINK_LIBRARIES ${UUID_LIBRARIES})
+  endif()
   set(SPDK_INCLUDE_DIR "${source_dir}/include")
   unset(source_dir)
-  unset(iface_libs)
 endmacro()
index ecf1819f5e55ee01b5bc7c05d4d4310b8dd87a95..47abd1fe57bda8a8a63ee387fde8b37ef277ac96 100644 (file)
@@ -11,7 +11,7 @@ find_path(DPDK_INCLUDE_DIR rte_config.h
   HINTS $ENV{DPDK_DIR}/include)
 
 set(components
-  cmdline eal ethdev hash kvargs mbuf
+  pci bus_pci cmdline eal ethdev hash kvargs mbuf
   mempool mempool_ring mempool_stack
   pmd_bond pmd_vmxnet3_uio pmd_ixgbe pmd_i40e pmd_ring pmd_af_packet
   ring)
diff --git a/cmake/modules/Finduuid.cmake b/cmake/modules/Finduuid.cmake
new file mode 100644 (file)
index 0000000..2bce82b
--- /dev/null
@@ -0,0 +1,20 @@
+# Try to find libuuid
+# Once done, this will define
+#
+# UUID_FOUND - system has Profiler
+# UUID_INCLUDE_DIR - the Profiler include directories
+# UUID_LIBRARIES - link these to use Profiler
+
+if(UUID_INCLUDE_DIR AND UUID_LIBRARIES)
+  set(UUID_FIND_QUIETLY TRUE)
+endif()
+
+find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
+find_library(UUID_LIBRARIES NAMES uuid)
+set(UUID_LIBRARIES ${LIBUUID})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(uuid
+  DEFAULT_MSG UUID_LIBRARIES UUID_INCLUDE_DIR)
+
+mark_as_advanced(UUID_LIBRARIES UUID_INCLUDE_DIR)
index feae24148f8c14df246e5d00230d63ba5dd12398..57c2da7932dc8325e1604ce00d72ec2b4f097664 100755 (executable)
@@ -34,6 +34,7 @@ setconf CONFIG_RTE_LIBRTE_PDUMP n
 # no vm support
 setconf CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT n
 setconf CONFIG_RTE_LIBRTE_VHOST n
+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
@@ -44,3 +45,6 @@ setconf CONFIG_RTE_TEST_PMD n
 
 # async/dpdk does not like it
 setconf CONFIG_RTE_MBUF_REFCNT_ATOMIC n
+
+# balanced allocation of hugepages
+setconf CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES n
index b8b32aa6e1b7ea95ce0aa38ffec655d3dc57a721..16ecb2a88afc93fdcf7d2492c884b84a882edd3a 100644 (file)
@@ -60,6 +60,7 @@ Build-Depends: bc,
                python3-all-dev,
                python3-setuptools,
                socat,
+               uuid-dev,
                uuid-runtime,
                valgrind,
                virtualenv | python-virtualenv,