]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
doc: Add MCTP scan details to mi document
authorJeremy Kerr <jk@codeconstruct.com.au>
Thu, 23 Jun 2022 06:21:06 +0000 (14:21 +0800)
committerJeremy Kerr <jk@codeconstruct.com.au>
Fri, 24 Jun 2022 07:42:50 +0000 (15:42 +0800)
Add some background information on the scan process, including
dependencies on D-Bus and mctpd.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
doc/mi.rst
doc/mi.rst.in

index 4a1bbe3b541f5026af05ec8a27889dba540da07b..28066680512fcde7d5de96b7aefcceeca411fd52 100644 (file)
@@ -27,3 +27,17 @@ each have a unique ``unsigned int`` as their ID.
 
 The default Network ID is 1; unless you have configured otherwise, MCTP
 endpoints will appear on this network.
+
+If compiled with D-Bus support, ``libnvme-mi`` can query the system MCTP daemon
+("``mctpd``") to find attached NVMe devices, via the ``nvme_mi_scan_mctp()``
+function. Calling this will establish a ``nvme_root_t`` object, populated
+with the results of that scan. Use the ``nvme_mi_for_each_endpoint`` macro
+to iterate through the scanned endpoints.
+
+Note that the MCTP daemon is provided separately, as part of the MCTP userspace
+tools, at https://github.com/CodeConstruct/mctp . ``mctpd`` is responsible for
+discovery and enumeration for MCTP endpoints on the system, and will query
+each for its protocol capabilities during enumeration. Consequently, NVMe-MI
+endpoints will need to report support for NVMe-MI-over-MCTP (protocol 0x4) in
+their supported protocols list (ie., as returned by the MCTP Get Message Type
+Support command) in order to be discovered.
index 4a1bbe3b541f5026af05ec8a27889dba540da07b..28066680512fcde7d5de96b7aefcceeca411fd52 100644 (file)
@@ -27,3 +27,17 @@ each have a unique ``unsigned int`` as their ID.
 
 The default Network ID is 1; unless you have configured otherwise, MCTP
 endpoints will appear on this network.
+
+If compiled with D-Bus support, ``libnvme-mi`` can query the system MCTP daemon
+("``mctpd``") to find attached NVMe devices, via the ``nvme_mi_scan_mctp()``
+function. Calling this will establish a ``nvme_root_t`` object, populated
+with the results of that scan. Use the ``nvme_mi_for_each_endpoint`` macro
+to iterate through the scanned endpoints.
+
+Note that the MCTP daemon is provided separately, as part of the MCTP userspace
+tools, at https://github.com/CodeConstruct/mctp . ``mctpd`` is responsible for
+discovery and enumeration for MCTP endpoints on the system, and will query
+each for its protocol capabilities during enumeration. Consequently, NVMe-MI
+endpoints will need to report support for NVMe-MI-over-MCTP (protocol 0x4) in
+their supported protocols list (ie., as returned by the MCTP Get Message Type
+Support command) in order to be discovered.