mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
cmake,rpm,deb: update to accommodate SPDK v17.10
* 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>
This commit is contained in:
parent
c05e842009
commit
b3ceafe7d8
@ -132,6 +132,7 @@ BuildRequires: libcurl-devel
|
||||
BuildRequires: libudev-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: make
|
||||
BuildRequires: parted
|
||||
BuildRequires: perl
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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)
|
||||
|
||||
20
cmake/modules/Finduuid.cmake
Normal file
20
cmake/modules/Finduuid.cmake
Normal file
@ -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)
|
||||
@ -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
|
||||
|
||||
1
debian/control
vendored
1
debian/control
vendored
@ -60,6 +60,7 @@ Build-Depends: bc,
|
||||
python3-all-dev,
|
||||
python3-setuptools,
|
||||
socat,
|
||||
uuid-dev,
|
||||
uuid-runtime,
|
||||
valgrind,
|
||||
virtualenv | python-virtualenv,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user