Spdk/doc
Parameswaran Krishnamurthy 2796687d54 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>
2023-01-12 17:22:48 +00:00
..
img spdk_top: update spdk_top docs for spdk.io 2021-03-08 10:48:47 +00:00
.gitignore doc: add output directory to .gitignore 2018-06-19 07:15:50 +00:00
about.md Fix Markdown MD026 linter warnings - trailing punctuation in header 2020-02-17 10:07:21 +00:00
accel_fw.md module/accel: Add accel_dpdk_cryptodev 2023-01-11 09:16:59 +00:00
applications.md trace: update trace help inside SPDK target 2022-09-27 19:41:17 +00:00
bdev_module.md doc/bdev_module: make claims documentation match reality 2023-01-05 23:28:32 +00:00
bdev_pg.md bdev: Add spdk_for_each_bdev/bdev_leaf for clean up and further improvements 2022-04-05 07:30:47 +00:00
bdev.md doc/bdev: add ` to show discolored fonts 2022-12-08 12:56:38 +00:00
bdevperf.md doc: cleanup bdevperf.py 2022-06-20 09:56:52 +00:00
blob.md doc/blob: replace htmlonly graphic with ASCII art 2022-02-02 08:25:02 +00:00
blobfs.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
ci_tools.md doc: Add page describing OS distros used by the CI 2021-09-20 10:48:56 +00:00
compression.md markdownlint: enable rule MD040 2021-09-08 21:53:48 +00:00
concepts.md doc: Add concept page on submitting I/O to an NVMe device 2019-05-09 04:33:19 +00:00
concurrency.md doc: mention SPDK spinlocks in concurrency.md 2022-12-21 09:34:34 +00:00
containers.md doc/container: display spdk-docker-suite in doc 2022-03-09 08:01:38 +00:00
distributions.md doc/distributions: update doc according to the recent changes 2022-10-13 07:51:32 +00:00
Doxyfile doc/Doxyfile: remove obsolete options with the default values 2022-12-20 09:17:18 +00:00
driver_modules.md doc: add IDXD docs and changelog entry 2020-04-23 15:48:32 +00:00
event.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
footer.html doc: simplify HTML header and stylesheet 2017-04-28 13:13:48 -07:00
ftl.md doc/ftl.md: fix ftl_l2p reference 2022-12-16 09:21:04 +00:00
gdb_macros.md misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
general.md doc: added scheduler framework documentation 2021-01-29 18:21:13 +00:00
getting_started.md doc: user --recursive in directions for cloning SPDK repo 2022-10-14 08:35:38 +00:00
header.html doc: Remove mobile responsiveness 2018-12-10 15:56:50 +00:00
idxd.md doc/idxd: update idxd docs regarding configs 2022-05-23 19:51:23 +00:00
index.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
intro.md deprecation: add a file to gather all deprecation notices 2021-04-26 06:55:03 +00:00
ioat.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
iscsi.md spelling: doc 2021-11-30 09:05:19 +00:00
jsonrpc_proxy.md markdownlint: enable rule MD040 2021-09-08 21:53:48 +00:00
jsonrpc.md nvme: Added support for TP-8009, Auto-discovery of Discovery controllers for NVME initiator using mDNS using Avahi 2023-01-12 17:22:48 +00:00
libraries.md spelling: doc 2021-11-30 09:05:19 +00:00
lvol.md markdownlint: enable rule MD040 2021-09-08 21:53:48 +00:00
Makefile add Intel copyright notices (and/or SPDX lic) where missing 2022-11-10 08:28:53 +00:00
memory.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
misc.md doc/rpms: add reference to rpms doc page 2021-06-22 23:47:52 +00:00
notify.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
nvme_multipath.md doc/nvme_multipath: Suggest transport_ack_timeout for fast error detection 2022-09-21 07:52:44 +00:00
nvme_spec.md doc: correct explanation of NVMe SQ command submission 2021-01-25 12:52:08 +00:00
nvme.md markdownlint: enable rule MD040 2021-09-08 21:53:48 +00:00
nvmf_multipath_howto.md bdevperf: promote bdevperf from test to example application 2022-11-16 09:52:41 +00:00
nvmf_tgt_pg.md lib/nvmf: remove deprecated API 2021-03-18 14:43:08 +00:00
nvmf_tracing.md doc/nvmf_tracing: update some nvmf_trace lines according the latest codes 2022-09-09 12:58:21 +00:00
nvmf.md doc: user --recursive in directions for cloning SPDK repo 2022-10-14 08:35:38 +00:00
overview.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
peer_2_peer.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
performance_reports.md doc: add 22.09 NVMe-oF RDMA performance report link 2022-11-30 08:41:39 +00:00
pkgconfig.md markdownlint: enable rule MD040 2021-09-08 21:53:48 +00:00
porting.md markdownlint: enable rule MD046 2021-09-08 21:53:48 +00:00
prog_guides.md doc/notify: add missing links about notify 2019-05-07 06:11:45 +00:00
README.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
rpm.md doc/rpm: Add information about new functionality 2022-01-05 09:24:59 +00:00
scheduler.md scheduler.md: update static scheduler description 2022-10-21 07:33:06 +00:00
shfmt.md doc/shfmt: Add note about minimal version of Bash 2021-11-10 23:11:41 +00:00
sma.md doc: describe storage management agent 2022-05-20 09:16:54 +00:00
spdk_top.md docs/spdk_top: add a note about scheduler pop-up 2022-12-13 09:26:29 +00:00
spdkcli.md doc: cleanup spdkcli.py 2022-06-20 09:56:52 +00:00
ssd_internals.md doc: Rename directory_structure.md to overview.md 2019-05-09 04:33:19 +00:00
stylesheet.css doc: Remove mobile responsiveness 2018-12-10 15:56:50 +00:00
system_configuration.md spelling: doc 2021-11-30 09:05:19 +00:00
template_pg.md spelling: doc 2021-11-30 09:05:19 +00:00
tools.md test: remove spdk/nvme-cli references 2021-01-04 16:28:01 +00:00
two.min.js doc: Add license header to two.js source 2018-08-06 16:27:58 +00:00
usdt.md doc/usdt: update build section 2022-08-29 10:50:20 +00:00
user_guides.md doc: describe storage management agent 2022-05-20 09:16:54 +00:00
userspace.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
vagrant.md misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
vhost_processing.md doc/vhost: update Vhost-user link and terminology 2022-08-16 07:21:00 +00:00
vhost.md doc: fix typo in vhost document 2022-11-21 12:01:05 +00:00
virtio.md markdownlint: enable rule MD025 2021-08-26 19:27:22 +00:00
vmd.md vmd: rename enable_vmd RPC to vmd_enable 2022-09-01 08:48:32 +00:00

SPDK Documentation

The current version of the SPDK documentation can be found online at http://www.spdk.io/doc/

Building the Documentation

To convert the documentation into HTML run make in the doc directory. The output will be located in doc/output/html. Before running make ensure all pre-requisites are installed. See Installing Prerequisites for more details.