early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

45
externals/vcpkg/ports/spdk/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,45 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.9)
PROJECT(spdk C)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}")
FIND_PACKAGE(Numa REQUIRED)
FIND_PACKAGE(uuid REQUIRED)
FIND_PACKAGE(ibverbs REQUIRED)
FIND_PACKAGE(RDMA REQUIRED)
FIND_PACKAGE(OpenSSL REQUIRED)
FIND_PACKAGE(Python COMPONENTS Interpreter REQUIRED)
FIND_PROGRAM(MAKE make)
IF (SOURCE_PATH)
SET(CMAKE_SOURCE_DIR ${SOURCE_PATH})
ENDIF ()
SET(SPDK_CONFIG --disable-tests --with-rdma --without-isal --with-dpdk=${CMAKE_SOURCE_DIR}/../../../spdk-dpdk/src/spdk-18.11-411c51fb97/build)
# No option to define path for isa-l (--with-isal=${CMAKE_SOURCE_DIR}/../../../spdk-isal/src/spdk-d34ebb51cd)
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
LIST(APPEND ${SPDK_CONFIG} --enable-debug)
ENDIF ()
SET(DPDK_CONFIG "-fPIC")
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
STRING(APPEND ${DPDK_CONFIG} "-O0 -g")
ENDIF ()
ADD_CUSTOM_TARGET(spdk-configure
COMMAND ./configure ${SPDK_CONFIG}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/
VERBATIM
)
ADD_CUSTOM_TARGET(spdk ALL
COMMAND ${MAKE} -j DPDK_CFLAGS=${DPDK_CONFIG}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/
)
ADD_DEPENDENCIES(spdk spdk-configure)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/build/lib
DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/)

26
externals/vcpkg/ports/spdk/FindNuma.cmake vendored Executable file
View File

@@ -0,0 +1,26 @@
INCLUDE(FindPackageHandleStandardArgs)
FIND_PATH(NUMA_ROOT_DIR
NAMES include/numa.h
PATHS ENV NUMA_ROOT
DOC "NUMA library root directory")
FIND_PATH(NUMA_INCLUDE_DIR
NAMES numa.h
HINTS ${NUMA_ROOT_DIR}
PATH_SUFFIXES include
DOC "NUMA include directory")
FIND_LIBRARY(NUMA_LIBRARY
NAMES numa
HINTS ${NUMA_ROOT_DIR}
DOC "NUMA library file")
IF (NUMA_LIBRARY)
GET_FILENAME_COMPONENT(NUMA_LIBRARY_DIR ${NUMA_LIBRARY} PATH)
MARK_AS_ADVANCED(NUMA_INCLUDE_DIR NUMA_LIBRARY_DIR NUMA_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMA REQUIRED_VARS NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY)
ELSE ()
SET(NUMA_FOUND FALSE)
MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)")
ENDIF ()

32
externals/vcpkg/ports/spdk/FindRDMA.cmake vendored Executable file
View File

@@ -0,0 +1,32 @@
FIND_PATH(RDMA_INCLUDE_DIR rdma/rdma_cma.h
/usr/include
/usr/include/linux
/usr/local/include
)
FIND_LIBRARY(RDMA_LIBRARY NAMES rdmacm
PATHS
/usr/lib
/usr/local/lib
/usr/lib64
/usr/local/lib64
/lib/i386-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
)
INCLUDE(FindPackageHandleStandardArgs)
IF (APPLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RDMA DEFAULT_MSG
RDMA_INCLUDE_DIR)
ELSE ()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RDMA DEFAULT_MSG
RDMA_LIBRARY RDMA_INCLUDE_DIR)
ENDIF ()
MARK_AS_ADVANCED(RDMA_INCLUDE_DIR RDMA_LIBRARY)
IF (NOT RDMA_LIBRARY)
SET(RDMA_FOUND FALSE)
MESSAGE(FATAL_ERROR "RDMA library not found.\nTry: 'sudo yum install librdmacm-devel librdmacm' (or sudo apt-get install librdmacm-dev librdmacm1)")
ENDIF ()

34
externals/vcpkg/ports/spdk/Findibverbs.cmake vendored Executable file
View File

@@ -0,0 +1,34 @@
# Find the ibverbs libraries
#
# The following variables are optionally searched for defaults
# IBVERBS_ROOT_DIR: Base directory where all ibverbs components are found
# IBVERBS_INCLUDE_DIR: Directory where ibverbs headers are found
# IBVERBS_LIB_DIR: Directory where ibverbs libraries are found
# The following are set after configuration is done:
# IBVERBS_FOUND
# IBVERBS_INCLUDE_DIRS
# IBVERBS_LIBRARIES
FIND_PATH(IBVERBS_INCLUDE_DIRS
NAMES infiniband/verbs.h
HINTS
${IBVERBS_INCLUDE_DIR}
${IBVERBS_ROOT_DIR}
${IBVERBS_ROOT_DIR}/include)
FIND_LIBRARY(IBVERBS_LIBRARIES
NAMES ibverbs
HINTS
${IBVERBS_LIB_DIR}
${IBVERBS_ROOT_DIR}
${IBVERBS_ROOT_DIR}/lib)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ibverbs DEFAULT_MSG IBVERBS_INCLUDE_DIRS IBVERBS_LIBRARIES)
MARK_AS_ADVANCED(IBVERBS_INCLUDE_DIR IBVERBS_LIBRARIES)
IF (NOT IBVERBS_LIBRARIES)
SET(IBVERBS_FOUND FALSE)
MESSAGE(FATAL_ERROR "ibverbs library not found.\nTry: 'sudo yum install libibverbs-devel libibverbs' (or sudo apt-get install libibverbs-dev libibverbs1)")
ENDIF ()

49
externals/vcpkg/ports/spdk/Finduuid.cmake vendored Executable file
View File

@@ -0,0 +1,49 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
FIND_PATH(UUID_INCLUDE_DIR uuid/uuid.h
/usr/include
/usr/include/linux
/usr/local/include
)
FIND_LIBRARY(UUID_LIBRARY NAMES uuid
PATHS
/usr/lib
/usr/local/lib
/usr/lib64
/usr/local/lib64
/lib/i386-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
)
INCLUDE(FindPackageHandleStandardArgs)
IF (APPLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UUID DEFAULT_MSG
UUID_INCLUDE_DIR)
ELSE ()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UUID DEFAULT_MSG
UUID_LIBRARY UUID_INCLUDE_DIR)
ENDIF ()
MARK_AS_ADVANCED(UUID_INCLUDE_DIR UUID_LIBRARY)
IF (NOT UUID_LIBRARY)
SET(UUID_FOUND FALSE)
MESSAGE(FATAL_ERROR "UUID library not found.\nTry: 'sudo yum install libuuid uuid-devel' (or sudo apt-get install libuuid1 uuid-dev)")
ENDIF ()

38
externals/vcpkg/ports/spdk/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,38 @@
IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
MESSAGE(FATAL_ERROR "Intel spdk currently only supports Linux/BSD platforms")
ENDIF ()
VCPKG_FROM_GITHUB(
OUT_SOURCE_PATH SOURCE_PATH
REPO spdk/spdk
REF v19.01.1
SHA512 cb2c085e1a5d370df60599aaeb6302f8252626342a9e0644018df8c769f406304591680f905572848390c3139e640496f96e3b4fc67469c56eb9a5329aee4b24
HEAD_REF master
)
FIND_PATH(NUMA_INCLUDE_DIR NAME numa.h
PATHS ENV NUMA_ROOT
HINTS $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include
)
IF (NOT NUMA_INCLUDE_DIR)
MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)")
ENDIF ()
VCPKG_CONFIGURE_CMAKE(
SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
PREFER_NINJA
OPTIONS
-DSOURCE_PATH=${SOURCE_PATH}
)
VCPKG_INSTALL_CMAKE()
FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
FILE(INSTALL ${SOURCE_PATH}/include/spdk DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT})
FILE(INSTALL ${SOURCE_PATH}/scripts/setup.sh DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/scripts)
FILE(INSTALL ${SOURCE_PATH}/scripts/common.sh DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/scripts)
FILE(INSTALL ${SOURCE_PATH}/include/spdk/pci_ids.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/include/spdk)
FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

29
externals/vcpkg/ports/spdk/spdkConfig.cmake vendored Executable file
View File

@@ -0,0 +1,29 @@
FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR)
ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED)
SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES
IMPORTED_CONFIGURATIONS "RELEASE;DEBUG"
IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}"
IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}"
INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}"
)
SET(${NAMESPACE}_${LIB_NAME}_FOUND 1)
ENDFUNCTION()
GET_FILENAME_COMPONENT(SPDK_ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH)
GET_FILENAME_COMPONENT(SPDK_ROOT "${SPDK_ROOT}" PATH)
GET_FILENAME_COMPONENT(SPDK_ROOT "${SPDK_ROOT}" PATH)
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
LINK_DIRECTORIES(${SPDK_ROOT}/debug/lib/)
ELSE ()
LINK_DIRECTORIES(${SPDK_ROOT}/lib/)
ENDIF ()
FILE(GLOB SPDK_LIBS ${SPDK_ROOT}/lib/libspdk*.*)
FOREACH (LIB_FILE_NAME ${SPDK_LIBS})
GET_FILENAME_COMPONENT(LIB_NAME ${LIB_FILE_NAME} NAME_WE)
GET_FILENAME_COMPONENT(FULL_LIB_NAME ${LIB_FILE_NAME} NAME)
STRING(REPLACE "lib" "" LIB_NAME "${LIB_NAME}")
SET_LIBRARY_TARGET("SPDK" "${LIB_NAME}" "${SPDK_ROOT}/debug/lib/${FULL_LIB_NAME}" "${SPDK_ROOT}/lib/${FULL_LIB_NAME}" "${SPDK_ROOT}/include/spdk")
ENDFOREACH ()

44
externals/vcpkg/ports/spdk/usage vendored Executable file
View File

@@ -0,0 +1,44 @@
The package spdk is compatible with built-in CMake targets:
Add following to build examples/nvme/perf/perf.c
FIND_PACKAGE(spdk CONFIG REQUIRED)
FIND_PACKAGE(spdk-dpdk CONFIG REQUIRED)
ADD_EXECUTABLE(SPDKTest perf.c)
TARGET_LINK_DIRECTORIES(SPDKTest PRIVATE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/spdk)
TARGET_LINK_LIBRARIES(SPDKTest PRIVATE
SPDK::spdk_app_rpc
SPDK::spdk_bdev
SPDK::spdk_bdev_null
SPDK::spdk_bdev_rpc
SPDK::spdk_conf
SPDK::spdk_copy
SPDK::spdk_thread
SPDK::spdk_event
SPDK::spdk_event_bdev
SPDK::spdk_event_copy
SPDK::spdk_event_net
SPDK::spdk_net
SPDK::spdk_nvmf
SPDK::spdk_nvme
SPDK::spdk_sock_posix
SPDK::spdk_sock
SPDK::spdk_rpc
SPDK::spdk_jsonrpc
SPDK::spdk_json
SPDK::spdk_trace
SPDK::spdk_util
SPDK::spdk_log
SPDK::spdk_env_dpdk
SPDK::dpdk
numa
rdmacm
uuid
ibverbs
pthread
dl
)
Configuration script can be found at: ${CURRENT_PACKAGES_DIR}/share/${PORT}/scripts

12
externals/vcpkg/ports/spdk/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,12 @@
{
"name": "spdk",
"version-string": "19.01.1",
"port-version": 2,
"description": "Storage Performance Development Kit",
"supports": "linux",
"dependencies": [
"spdk-dpdk",
"spdk-ipsec",
"spdk-isal"
]
}