2022-06-03 19:15:11 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2022-11-01 20:26:26 +00:00
|
|
|
# Copyright (C) 2015 Intel Corporation.
|
2015-09-21 15:52:41 +00:00
|
|
|
# All rights reserved.
|
2022-10-04 19:14:10 +00:00
|
|
|
# Copyright (c) 2021, 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
nvme: Added support for TP-8009, Auto-discovery of Discovery controllers for NVME initiator using mDNS using Avahi
Approach:
Avahi Daemon needs to be running to provide the mDNS server service. In the SPDK, Avahi-client library based client API is implemented.
The client API will connect to the Avahi-daemon and receive events for new discovery and removal of an existing discovery entry.
Following sets on new RPCs have been introduced.
scripts/rpc.py bdev_nvme_start_mdns_discovery -b cdc_auto -s _nvme-disc._tcp
User shall initiate an mDNS based discovery using this RPC. This will start a Avahi-client based poller
looking for new discovery events from the Avahi server. On a new discovery of the discovery controller,
the existing bdev_nvme_start_discovery API will be invoked with the trid of the discovery controller learnt.
This will enable automatic connection of the initiator to the subsystems discovered from the discovery controller.
Multiple mdns discovery instances can be run by specifying a unique bdev-prefix and a unique servicename to discover as parameters.
scripts/rpc.py bdev_nvme_stop_mdns_discovery -b cdc_auto
This will stop the Avahi poller that was started for the specified service.Internally bdev_nvme_stop_discovery
API will be invoked for each of the discovery controllers learnt automatically by this instance of mdns discovery service.
This will result in termination of connections to all the subsystems learnt by this mdns discovery instance.
scripts/rpc.py bdev_nvme_get_mdns_discovery_info
This RPC will display the list of mdns discovery instances running and the trid of the controllers discovered by these instances.
Test Result:
root@ubuntu-pm-18-226:~/param-spdk/spdk/build/bin# ./nvmf_tgt -i 1 -s 2048 -m 0xF
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_start_mdns_discovery -b cdc_auto -s _nvme-disc._tcp
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_mdns_discovery_info
[
{
"name": "cdc_auto",
"svcname": "_nvme-disc._tcp",
"referrals": [
{
"name": "cdc_auto0",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.2.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
}
},
{
"name": "cdc_auto1",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
}
}
]
}
]
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_discovery_info
[
{
"name": "cdc_auto0",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.2.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
},
"referrals": []
},
{
"name": "cdc_auto1",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
},
"referrals": []
}
]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_get_bdevs
[
{
"name": "cdc_auto02n1",
"aliases": [
"600110d6-1681-1681-0403-000045805c45"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 32768,
"uuid": "600110d6-1681-1681-0403-000045805c45",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.0"
},
"ctrlr_data": {
"cntlid": 3,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P3T0",
"serial_number": "00-681681dc681681dc",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.0",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 1,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
},
{
"name": "cdc_auto00n1",
"aliases": [
"600110da-09a6-09a6-0302-00005eeb19b4"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 2048,
"uuid": "600110da-09a6-09a6-0302-00005eeb19b4",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.2.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.2.0"
},
"ctrlr_data": {
"cntlid": 1,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P2T0",
"serial_number": "00-ab09a6f5ab09a6f5",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.2.0",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 1,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
},
{
"name": "cdc_auto01n1",
"aliases": [
"600110d6-dce8-dce8-0403-00010b2d3d8c"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 32768,
"uuid": "600110d6-dce8-dce8-0403-00010b2d3d8c",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1"
},
"ctrlr_data": {
"cntlid": 3,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P3T1",
"serial_number": "01-6ddce86d6ddce86d",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 1,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
},
{
"name": "cdc_auto01n2",
"aliases": [
"600110d6-dce8-dce8-0403-00010b2d3d8d"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 32768,
"uuid": "600110d6-dce8-dce8-0403-00010b2d3d8d",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1"
},
"ctrlr_data": {
"cntlid": 3,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P3T1",
"serial_number": "01-6ddce86d6ddce86d",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 2,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
}
]
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_stop_mdns_discovery -b cdc_auto
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_mdns_discovery_info
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_discovery_info
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_get_bdevs
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk#
Signed-off-by: Parameswaran Krishnamurthy <parameswaran.krishna@dell.com>
Change-Id: Ic2c2e614e2549a655c7f81ae844b80d8505a4f02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15703
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-11-30 20:11:23 +00:00
|
|
|
# Copyright (c) 2022 Dell Inc, or its subsidiaries.
|
2015-09-21 15:52:41 +00:00
|
|
|
#
|
|
|
|
|
2022-11-03 07:28:06 +00:00
|
|
|
# configure options: __CONFIGURE_OPTIONS__
|
|
|
|
|
2017-11-15 17:36:36 +00:00
|
|
|
# Installation prefix
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_PREFIX="/usr/local"
|
2017-11-15 17:36:36 +00:00
|
|
|
|
2019-07-23 17:52:47 +00:00
|
|
|
# Target architecture
|
|
|
|
CONFIG_ARCH=native
|
|
|
|
|
2022-06-08 12:43:12 +00:00
|
|
|
# Destination directory for the libraries
|
|
|
|
CONFIG_LIBDIR=
|
|
|
|
|
2019-07-09 12:40:41 +00:00
|
|
|
# Prefix for cross compilation
|
|
|
|
CONFIG_CROSS_PREFIX=
|
|
|
|
|
2015-09-21 15:52:41 +00:00
|
|
|
# Build with debug logging. Turn off for performance testing and normal usage
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_DEBUG=n
|
2015-09-21 15:52:41 +00:00
|
|
|
|
2016-03-18 17:40:34 +00:00
|
|
|
# Treat warnings as errors (fail the build on any warning).
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_WERROR=n
|
2016-03-18 17:40:34 +00:00
|
|
|
|
2016-03-24 20:27:53 +00:00
|
|
|
# Build with link-time optimization.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_LTO=n
|
2016-03-24 20:27:53 +00:00
|
|
|
|
2019-02-11 18:19:32 +00:00
|
|
|
# Generate profile guided optimization data.
|
|
|
|
CONFIG_PGO_CAPTURE=n
|
|
|
|
|
|
|
|
# Use profile guided optimization data.
|
|
|
|
CONFIG_PGO_USE=n
|
|
|
|
|
2015-10-22 18:26:21 +00:00
|
|
|
# Build with code coverage instrumentation.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_COVERAGE=n
|
2015-10-22 18:26:21 +00:00
|
|
|
|
2015-11-04 19:46:09 +00:00
|
|
|
# Build with Address Sanitizer enabled
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_ASAN=n
|
2015-11-04 19:46:09 +00:00
|
|
|
|
2016-11-30 18:16:25 +00:00
|
|
|
# Build with Undefined Behavior Sanitizer enabled
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_UBSAN=n
|
2016-11-30 18:16:25 +00:00
|
|
|
|
test/nvmf: fuzz nvmf target using LLVM's libFuzzer
LLVM provides libFuzzer which does coverage-guided
fuzzing of a library or application under test. For
SPDK, we can use this as a new and better way to
generate random commands to the SPDK nvmf target.
By default, libFuzzer provides the main() and your
source file just provides the function called by
LLVM for each iteration of random data. But this
doesn't really work for SPDK since we need to start
the app framework and the nvmf target. So we
specify -fsanitizer=fuzzer-no-link, explicitly
specify the location of the fuzzer_no_main library
and then call LLVMFuzzerRunDriver to start the
fuzzing process once we are ready.
Since this is all coverage-guided, we invoke the
fuzzer inside the nvmf target application. So this
patch creates a new target application called
'llvm_nvme_fuzz'. One core is needed to run the
nvmf target, then we spawn a pthread to run the
fuzzer against it.
Currently there are two fuzzers defined. Fuzzer 0
does random testing of admin commands. Fuzzer 1
is focused solely on GET_LOG_PAGE and fuzzes a
smaller subset of the bytes in the spdk_nvme_cmd.
Additional fuzzers can be added in the future for
other commands, testing I/O queues, data payloads,
etc.
You do need to specify CC and CXX when running
configure, as well as specify the location of the
special clang_rt.fuzz_no_main library. The path of
that library is dependent on your clang version and
architecture. If using clang-12 on x86_64 platform,
it will look like:
CC=clang-12 CXX=clang++-12 ./configure --with-fuzzer= \
/usr/lib/llvm-12/lib/clang/12.0.0/lib/linux/libclang_rt.fuzzer_no_main-x86_64.a
Then just do the following to demonstrate the fuzzer
tool.
make
test/nvmf/target/llvm_nvme_fuzz.sh --time=60 --fuzzer=0
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iee0997501893ac284a3947a1db7a155c5ceb7849
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10038
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-15 21:54:52 +00:00
|
|
|
# Build with LLVM fuzzing enabled
|
|
|
|
CONFIG_FUZZER=n
|
|
|
|
CONFIG_FUZZER_LIB=
|
|
|
|
|
2017-05-24 22:00:54 +00:00
|
|
|
# Build with Thread Sanitizer enabled
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_TSAN=n
|
2017-05-24 22:00:54 +00:00
|
|
|
|
2020-03-06 09:08:29 +00:00
|
|
|
# Build functional tests
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_TESTS=y
|
2018-03-06 22:39:04 +00:00
|
|
|
|
2020-03-06 09:08:29 +00:00
|
|
|
# Build unit tests
|
|
|
|
CONFIG_UNIT_TESTS=y
|
|
|
|
|
2020-02-27 16:59:20 +00:00
|
|
|
# Build examples
|
|
|
|
CONFIG_EXAMPLES=y
|
|
|
|
|
2021-04-17 05:09:30 +00:00
|
|
|
# Build apps
|
|
|
|
CONFIG_APPS=y
|
|
|
|
|
2021-01-14 11:06:33 +00:00
|
|
|
# Build with Control-flow Enforcement Technology (CET)
|
|
|
|
CONFIG_CET=n
|
|
|
|
|
2016-08-10 17:28:20 +00:00
|
|
|
# Directory that contains the desired SPDK environment library.
|
|
|
|
# By default, this is implemented using DPDK.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_ENV=
|
2016-08-10 17:28:20 +00:00
|
|
|
|
2015-09-21 15:52:41 +00:00
|
|
|
# This directory should contain 'include' and 'lib' directories for your DPDK
|
2018-09-06 21:09:14 +00:00
|
|
|
# installation.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_DPDK_DIR=
|
2021-06-15 16:42:29 +00:00
|
|
|
# Automatically set via pkg-config when bare --with-dpdk is set
|
|
|
|
CONFIG_DPDK_LIB_DIR=
|
|
|
|
CONFIG_DPDK_INC_DIR=
|
|
|
|
CONFIG_DPDK_PKG_CONFIG=n
|
2015-09-21 15:52:41 +00:00
|
|
|
|
2021-03-03 09:48:43 +00:00
|
|
|
# This directory should contain 'include' and 'lib' directories for WPDK.
|
|
|
|
CONFIG_WPDK_DIR=
|
|
|
|
|
2018-09-26 11:19:28 +00:00
|
|
|
# Build SPDK FIO plugin. Requires CONFIG_FIO_SOURCE_DIR set to a valid
|
2016-04-13 00:58:29 +00:00
|
|
|
# fio source code directory.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_FIO_PLUGIN=n
|
2016-04-13 00:58:29 +00:00
|
|
|
|
|
|
|
# This directory should contain the source code directory for fio
|
|
|
|
# which is required for building the SPDK FIO plugin.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_FIO_SOURCE_DIR=/usr/src/fio
|
2016-06-06 21:44:30 +00:00
|
|
|
|
2016-07-13 22:34:28 +00:00
|
|
|
# Enable RDMA support for the NVMf target.
|
2016-06-06 21:44:30 +00:00
|
|
|
# Requires ibverbs development libraries.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_RDMA=n
|
|
|
|
CONFIG_RDMA_SEND_WITH_INVAL=n
|
2020-01-21 14:03:40 +00:00
|
|
|
CONFIG_RDMA_SET_ACK_TIMEOUT=n
|
2022-12-13 20:56:06 +00:00
|
|
|
CONFIG_RDMA_SET_TOS=n
|
2020-03-14 12:08:29 +00:00
|
|
|
CONFIG_RDMA_PROV=verbs
|
2016-09-20 04:12:45 +00:00
|
|
|
|
2019-10-24 18:04:33 +00:00
|
|
|
# Enable NVMe Character Devices.
|
|
|
|
CONFIG_NVME_CUSE=n
|
|
|
|
|
2019-04-22 09:28:02 +00:00
|
|
|
# Enable FC support for the NVMf target.
|
|
|
|
# Requires FC low level driver (from FC vendor)
|
|
|
|
CONFIG_FC=n
|
|
|
|
CONFIG_FC_PATH=
|
|
|
|
|
2016-09-20 04:12:45 +00:00
|
|
|
# Build Ceph RBD support in bdev modules
|
|
|
|
# Requires librbd development libraries
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_RBD=n
|
2017-03-06 20:34:45 +00:00
|
|
|
|
2022-03-08 23:55:01 +00:00
|
|
|
# Build DAOS support in bdev modules
|
|
|
|
# Requires daos development libraries
|
|
|
|
CONFIG_DAOS=n
|
2022-09-15 10:55:46 +00:00
|
|
|
CONFIG_DAOS_DIR=
|
2022-03-08 23:55:01 +00:00
|
|
|
|
2022-11-29 05:56:56 +00:00
|
|
|
# Build UBLK support
|
|
|
|
CONFIG_UBLK=n
|
|
|
|
|
2017-03-06 20:34:45 +00:00
|
|
|
# Build vhost library.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_VHOST=y
|
2017-09-29 08:49:51 +00:00
|
|
|
|
2017-10-17 17:04:28 +00:00
|
|
|
# Build vhost initiator (Virtio) driver.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_VIRTIO=y
|
2017-10-17 17:04:28 +00:00
|
|
|
|
2020-08-19 15:35:38 +00:00
|
|
|
# Build custom vfio-user transport for NVMf target and NVMe initiator.
|
2021-01-28 10:27:57 +00:00
|
|
|
CONFIG_VFIO_USER=n
|
2021-02-19 09:31:12 +00:00
|
|
|
CONFIG_VFIO_USER_DIR=
|
2020-11-02 15:32:20 +00:00
|
|
|
|
2022-01-19 10:12:50 +00:00
|
|
|
# Build with xNVMe
|
|
|
|
CONFIG_XNVME=n
|
|
|
|
|
2022-10-28 21:56:55 +00:00
|
|
|
# Enable the dependencies for building the DPDK accel compress module
|
|
|
|
CONFIG_DPDK_COMPRESSDEV=n
|
|
|
|
|
2022-10-28 23:07:51 +00:00
|
|
|
# Enable the dependencies for building the compress vbdev, includes the reduce library
|
|
|
|
CONFIG_VBDEV_COMPRESS=n
|
2018-09-21 14:37:54 +00:00
|
|
|
|
2022-10-28 23:07:51 +00:00
|
|
|
# Enable mlx5_pci dpdk compress PMD, enabled automatically if CONFIG_VBDEV_COMPRESS=y and libmlx5 exists
|
|
|
|
CONFIG_VBDEV_COMPRESS_MLX5=n
|
2021-06-15 13:25:07 +00:00
|
|
|
|
2022-01-19 15:28:13 +00:00
|
|
|
# Enable mlx5_pci dpdk crypto PMD, enabled automatically if CONFIG_CRYPTO=y and libmlx5 exists
|
|
|
|
CONFIG_CRYPTO_MLX5=n
|
|
|
|
|
2017-12-04 17:07:04 +00:00
|
|
|
# Requires libiscsi development libraries.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_ISCSI_INITIATOR=n
|
2018-05-08 11:30:29 +00:00
|
|
|
|
2018-03-22 23:24:14 +00:00
|
|
|
# Enable the dependencies for building the crypto vbdev
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_CRYPTO=n
|
2018-08-14 17:56:26 +00:00
|
|
|
|
|
|
|
# Build spdk shared libraries in addition to the static ones.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_SHARED=n
|
2018-09-26 11:19:28 +00:00
|
|
|
|
2022-11-02 15:09:36 +00:00
|
|
|
# Build with VTune support.
|
2018-09-21 14:32:36 +00:00
|
|
|
CONFIG_VTUNE=n
|
|
|
|
CONFIG_VTUNE_DIR=
|
2018-10-10 17:09:07 +00:00
|
|
|
|
2019-01-13 20:28:21 +00:00
|
|
|
# Build Intel IPSEC_MB library
|
|
|
|
CONFIG_IPSEC_MB=n
|
2018-09-20 16:54:49 +00:00
|
|
|
|
|
|
|
# Enable OCF module
|
|
|
|
CONFIG_OCF=n
|
|
|
|
CONFIG_OCF_PATH=
|
|
|
|
CONFIG_CUSTOMOCF=n
|
2019-01-21 09:05:59 +00:00
|
|
|
|
|
|
|
# Build ISA-L library
|
|
|
|
CONFIG_ISAL=y
|
2019-02-14 19:07:42 +00:00
|
|
|
|
2022-10-04 19:14:10 +00:00
|
|
|
# Build ISA-L-crypto library
|
|
|
|
CONFIG_ISAL_CRYPTO=y
|
|
|
|
|
2019-02-14 19:07:42 +00:00
|
|
|
# Build with IO_URING support
|
|
|
|
CONFIG_URING=n
|
|
|
|
|
2022-07-02 14:53:02 +00:00
|
|
|
# Build IO_URING bdev with ZNS support
|
|
|
|
CONFIG_URING_ZNS=n
|
|
|
|
|
2019-02-14 19:07:42 +00:00
|
|
|
# Path to custom built IO_URING library
|
|
|
|
CONFIG_URING_PATH=
|
2019-10-08 12:28:49 +00:00
|
|
|
|
2022-06-24 23:38:40 +00:00
|
|
|
# Path to custom built OPENSSL library
|
|
|
|
CONFIG_OPENSSL_PATH=
|
|
|
|
|
2019-10-08 12:28:49 +00:00
|
|
|
# Build with FUSE support
|
|
|
|
CONFIG_FUSE=n
|
2019-11-04 11:35:50 +00:00
|
|
|
|
2022-04-27 09:18:05 +00:00
|
|
|
# Build with RAID5f support
|
|
|
|
CONFIG_RAID5F=n
|
2020-04-10 15:29:01 +00:00
|
|
|
|
|
|
|
# Build with IDXD support
|
2021-03-31 10:09:42 +00:00
|
|
|
# In this mode, SPDK fully controls the DSA device.
|
2020-04-10 15:29:01 +00:00
|
|
|
CONFIG_IDXD=n
|
usdt: add User Space DTrace support to SPDK
For now, we will keep this disabled by default,
enable with --with-usdt option to the configure
script. Long-term we will want to enable this by
default, and only disable via configure.
Modules can include spdk_internal/usdt.h and add
probes such as:
SPDK_DTRACE_PROBE2(probe_name, ptr, val);
When USDT is enabled, these will translate to
DTRACE_PROBE2(spdk, probe_name, ptr, val). When
USDT is disabled, these will translate to nothing.
Later patches will add some probe points to the
nvmf target, some bpftrace scripts, and instructions
for how to successfully capture data with these
probe points and scripts.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id168e2c800fa5522815a175026386319014cfdaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7173
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-31 22:33:20 +00:00
|
|
|
|
|
|
|
# Build with USDT support
|
|
|
|
CONFIG_USDT=n
|
2021-03-31 10:09:42 +00:00
|
|
|
|
|
|
|
# Build with IDXD kernel support.
|
|
|
|
# In this mode, SPDK shares the DSA device with the kernel.
|
|
|
|
CONFIG_IDXD_KERNEL=n
|
2022-01-18 07:57:15 +00:00
|
|
|
|
2022-08-12 05:00:25 +00:00
|
|
|
# arc4random is available in stdlib.h
|
|
|
|
CONFIG_HAVE_ARC4RANDOM=n
|
|
|
|
|
2023-01-23 13:48:08 +00:00
|
|
|
# uuid_generate_sha1 is available in uuid/uuid.h
|
|
|
|
CONFIG_HAVE_UUID_GENERATE_SHA1=n
|
|
|
|
|
2022-01-18 07:57:15 +00:00
|
|
|
# Is DPDK using libbsd?
|
|
|
|
CONFIG_HAVE_LIBBSD=n
|
2022-01-19 05:42:56 +00:00
|
|
|
|
2022-12-14 11:20:33 +00:00
|
|
|
# Is DPDK using libarchive?
|
|
|
|
CONFIG_HAVE_LIBARCHIVE=n
|
|
|
|
|
2022-01-19 05:42:56 +00:00
|
|
|
# Path to IPSEC_MB used by DPDK
|
|
|
|
CONFIG_IPSEC_MB_DIR=
|
2022-01-05 09:14:39 +00:00
|
|
|
|
|
|
|
# Generate Storage Management Agent's protobuf interface
|
|
|
|
CONFIG_SMA=n
|
nvme: Added support for TP-8009, Auto-discovery of Discovery controllers for NVME initiator using mDNS using Avahi
Approach:
Avahi Daemon needs to be running to provide the mDNS server service. In the SPDK, Avahi-client library based client API is implemented.
The client API will connect to the Avahi-daemon and receive events for new discovery and removal of an existing discovery entry.
Following sets on new RPCs have been introduced.
scripts/rpc.py bdev_nvme_start_mdns_discovery -b cdc_auto -s _nvme-disc._tcp
User shall initiate an mDNS based discovery using this RPC. This will start a Avahi-client based poller
looking for new discovery events from the Avahi server. On a new discovery of the discovery controller,
the existing bdev_nvme_start_discovery API will be invoked with the trid of the discovery controller learnt.
This will enable automatic connection of the initiator to the subsystems discovered from the discovery controller.
Multiple mdns discovery instances can be run by specifying a unique bdev-prefix and a unique servicename to discover as parameters.
scripts/rpc.py bdev_nvme_stop_mdns_discovery -b cdc_auto
This will stop the Avahi poller that was started for the specified service.Internally bdev_nvme_stop_discovery
API will be invoked for each of the discovery controllers learnt automatically by this instance of mdns discovery service.
This will result in termination of connections to all the subsystems learnt by this mdns discovery instance.
scripts/rpc.py bdev_nvme_get_mdns_discovery_info
This RPC will display the list of mdns discovery instances running and the trid of the controllers discovered by these instances.
Test Result:
root@ubuntu-pm-18-226:~/param-spdk/spdk/build/bin# ./nvmf_tgt -i 1 -s 2048 -m 0xF
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_start_mdns_discovery -b cdc_auto -s _nvme-disc._tcp
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_mdns_discovery_info
[
{
"name": "cdc_auto",
"svcname": "_nvme-disc._tcp",
"referrals": [
{
"name": "cdc_auto0",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.2.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
}
},
{
"name": "cdc_auto1",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
}
}
]
}
]
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_discovery_info
[
{
"name": "cdc_auto0",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.2.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
},
"referrals": []
},
{
"name": "cdc_auto1",
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.21",
"trsvcid": "8009",
"subnqn": "nqn.2014-08.org.nvmexpress.discovery"
},
"referrals": []
}
]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_get_bdevs
[
{
"name": "cdc_auto02n1",
"aliases": [
"600110d6-1681-1681-0403-000045805c45"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 32768,
"uuid": "600110d6-1681-1681-0403-000045805c45",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.0"
},
"ctrlr_data": {
"cntlid": 3,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P3T0",
"serial_number": "00-681681dc681681dc",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.0",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 1,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
},
{
"name": "cdc_auto00n1",
"aliases": [
"600110da-09a6-09a6-0302-00005eeb19b4"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 2048,
"uuid": "600110da-09a6-09a6-0302-00005eeb19b4",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.2.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.2.0"
},
"ctrlr_data": {
"cntlid": 1,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P2T0",
"serial_number": "00-ab09a6f5ab09a6f5",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.2.0",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 1,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
},
{
"name": "cdc_auto01n1",
"aliases": [
"600110d6-dce8-dce8-0403-00010b2d3d8c"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 32768,
"uuid": "600110d6-dce8-dce8-0403-00010b2d3d8c",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1"
},
"ctrlr_data": {
"cntlid": 3,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P3T1",
"serial_number": "01-6ddce86d6ddce86d",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 1,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
},
{
"name": "cdc_auto01n2",
"aliases": [
"600110d6-dce8-dce8-0403-00010b2d3d8d"
],
"product_name": "NVMe disk",
"block_size": 512,
"num_blocks": 32768,
"uuid": "600110d6-dce8-dce8-0403-00010b2d3d8d",
"assigned_rate_limits": {
"rw_ios_per_sec": 0,
"rw_mbytes_per_sec": 0,
"r_mbytes_per_sec": 0,
"w_mbytes_per_sec": 0
},
"claimed": false,
"zoned": false,
"supported_io_types": {
"read": true,
"write": true,
"unmap": true,
"write_zeroes": true,
"flush": true,
"reset": true,
"compare": true,
"compare_and_write": true,
"abort": true,
"nvme_admin": true,
"nvme_io": true
},
"driver_specific": {
"nvme": [
{
"trid": {
"trtype": "TCP",
"adrfam": "IPv4",
"traddr": "66.1.1.40",
"trsvcid": "4420",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1"
},
"ctrlr_data": {
"cntlid": 3,
"vendor_id": "0x0000",
"model_number": "SANBlaze VLUN P3T1",
"serial_number": "01-6ddce86d6ddce86d",
"firmware_revision": "V10.5",
"subnqn": "nqn.2014-08.com.sanblaze:virtualun.virtualun.3.1",
"oacs": {
"security": 0,
"format": 1,
"firmware": 0,
"ns_manage": 1
},
"multi_ctrlr": true,
"ana_reporting": true
},
"vs": {
"nvme_version": "2.0"
},
"ns_data": {
"id": 2,
"ana_state": "optimized",
"can_share": true
}
}
],
"mp_policy": "active_passive"
}
}
]
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_stop_mdns_discovery -b cdc_auto
root@ubuntu-pm-18-226:~/param-spdk/spdk#
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_mdns_discovery_info
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_nvme_get_discovery_info
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk# scripts/rpc.py bdev_get_bdevs
[]
root@ubuntu-pm-18-226:~/param-spdk/spdk#
Signed-off-by: Parameswaran Krishnamurthy <parameswaran.krishna@dell.com>
Change-Id: Ic2c2e614e2549a655c7f81ae844b80d8505a4f02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15703
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-11-30 20:11:23 +00:00
|
|
|
|
|
|
|
# Build with Avahi support
|
|
|
|
CONFIG_AVAHI=n
|