Skip to content

Commit 5488fcf

Browse files
committed
types: Fabrics doc strings updates
Includes a typo correction, prefix changes, transition away from anonymous enums and added some more enum members according to the standard. All subtle API breaks.
1 parent 16c28fa commit 5488fcf

1 file changed

Lines changed: 95 additions & 49 deletions

File tree

src/nvme/types.h

Lines changed: 95 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3830,7 +3830,7 @@ enum nvme_ae_info_notice {
38303830
};
38313831

38323832
/**
3833-
* enum nvme_subsys_type -
3833+
* enum nvme_subsys_type - Type of the NVM subsystem.
38343834
* @NVME_NQN_DISC: Discovery type target subsystem
38353835
* @NVME_NQN_NVME: NVME type target subsystem
38363836
* @NVME_NQN_CURR: Current Discovery type target subsystem
@@ -3855,24 +3855,54 @@ enum nvme_subsys_type {
38553855
#define NVMF_DISC_EFLAGS_BOTH 3
38563856

38573857
/**
3858-
* struct nvmf_disc_log_entry - Discovery log page entry
3859-
* @trtype:
3860-
* @adrfam:
3861-
* @subtype:
3862-
* @treq:
3863-
* @portid:
3864-
* @cntlid:
3865-
* @asqsz:
3858+
* struct nvmf_disc_log_entry - Discovery Log Page entry
3859+
* @trtype: Transport Type (TRTYPE): Specifies the NVMe Transport type.
3860+
* See &enum nvmf_trtype.
3861+
* @adrfam: Address Family (ADRFAM): Specifies the address family.
3862+
* See &enum nvmf_addr_family.
3863+
* @subtype: Subsystem Type (SUBTYPE): Specifies the type of the NVM subsystem
3864+
* that is indicated in this entry. See &enum nvme_subsys_type.
3865+
* @treq: Transport Requirements (TREQ): Indicates requirements for the NVMe
3866+
* Transport. See &enum nvmf_treq.
3867+
* @portid: Port ID (PORTID): Specifies a particular NVM subsystem port.
3868+
* Different NVMe Transports or address families may utilize the same
3869+
* Port ID value (e.g. a Port ID may support both iWARP and RoCE).
3870+
* @cntlid: Controller ID (CNTLID): Specifies the controller ID. If the NVM
3871+
* subsystem uses a dynamic controller model, then this field shall
3872+
* be set to FFFFh. If the NVM subsystem uses a static controller model,
3873+
* then this field may be set to a specific controller ID (values 0h
3874+
* to FFEFh are valid). If the NVM subsystem uses a static controller
3875+
* model and the value indicated is FFFEh, then the host should remember
3876+
* the Controller ID returned as part of the Fabrics Connect command
3877+
* in order to re-establish an association in the future with the same
3878+
* controller.
3879+
* @asqsz: Admin Max SQ Size (ASQSZ): Specifies the maximum size of an Admin
3880+
* Submission Queue. This applies to all controllers in the NVM
3881+
* subsystem. The value shall be a minimum of 32 entries.
38663882
* @eflags:
3867-
* @trsvcid:
3868-
* @subnqn:
3869-
* @traddr:
3883+
* @trsvcid: Transport Service Identifier (TRSVCID): Specifies the NVMe Transport
3884+
* service identifier as an ASCII string. The NVMe Transport service
3885+
* identifier is specified by the associated NVMe Transport binding
3886+
* specification.
3887+
* @subnqn: NVM Subsystem Qualified Name (SUBNQN): NVMe Qualified Name (NQN)
3888+
* that uniquely identifies the NVM subsystem. For a Discovery Service,
3889+
* the value returned shall be the well-known Discovery Service NQN
3890+
* (nqn.2014-08.org.nvmexpress.discovery).
3891+
* @traddr: Transport Address (TRADDR): Specifies the address of the NVM subsystem
3892+
* that may be used for a Connect command as an ASCII string. The
3893+
* Address Family field describes the reference for parsing this field.
38703894
* @common:
3871-
* @qptype:
3872-
* @prtype:
3873-
* @cms:
3874-
* @pkey:
3875-
* @sectype:
3895+
* @qptype: RDMA QP Service Type (RDMA_QPTYPE): Specifies the type of RDMA
3896+
* Queue Pair. See &enum nvmf_rdma_qptype.
3897+
* @prtype: RDMA Provider Type (RDMA_PRTYPE): Specifies the type of RDMA
3898+
* provider. See &enum nvmf_rdma_prtype.
3899+
* @cms: RDMA Connection Management Service (RDMA_CMS): Specifies the type
3900+
* of RDMA IP Connection Management Service. See &enum nvmf_rdma_cms.
3901+
* @pkey: RDMA_PKEY: Specifies the Partition Key when AF_IB (InfiniBand)
3902+
* address family type is used.
3903+
* @sectype: Security Type (SECTYPE): Specifies the type of security used by the
3904+
* NVMe/TCP port. If SECTYPE is a value of 0h (No Security), then the
3905+
* host shall set up a normal TCP connection. See &enum nvmf_tcp_sectype.
38763906
*/
38773907
struct nvmf_disc_log_entry {
38783908
__u8 trtype;
@@ -3905,14 +3935,15 @@ struct nvmf_disc_log_entry {
39053935
};
39063936

39073937
/**
3908-
* enum - Transport Type codes for Discovery Log Page entry TRTYPE field
3938+
* enum nvmf_trtype - Transport Type codes for Discovery Log Page entry TRTYPE field
39093939
* @NVMF_TRTYPE_UNSPECIFIED: Not indicated
39103940
* @NVMF_TRTYPE_RDMA: RDMA
39113941
* @NVMF_TRTYPE_FC: Fibre Channel
39123942
* @NVMF_TRTYPE_TCP: TCP
3913-
* @NVMF_TRTYPE_LOOP: Reserved for host usage
3943+
* @NVMF_TRTYPE_LOOP: Intra-host Transport (i.e., loopback), reserved
3944+
* for host usage.
39143945
*/
3915-
enum nvme_trtype {
3946+
enum nvmf_trtype {
39163947
NVMF_TRTYPE_UNSPECIFIED = 0,
39173948
NVMF_TRTYPE_RDMA = 1,
39183949
NVMF_TRTYPE_FC = 2,
@@ -3922,23 +3953,26 @@ enum nvme_trtype {
39223953
};
39233954

39243955
/**
3925-
* enum - Address Family codes for Discovery Log Page entry ADRFAM field
3956+
* enum nvmf_addr_family - Address Family codes for Discovery Log Page entry ADRFAM field
39263957
* @NVMF_ADDR_FAMILY_PCI: PCIe
3927-
* @NVMF_ADDR_FAMILY_IP4: IPv4
3928-
* @NVMF_ADDR_FAMILY_IP6: IPv6
3929-
* @NVMF_ADDR_FAMILY_IB: InfiniBand
3930-
* @NVMF_ADDR_FAMILY_FC: Fibre Channel
3931-
*/
3932-
enum nvmf_addr_familiy {
3958+
* @NVMF_ADDR_FAMILY_IP4: AF_INET: IPv4 address family.
3959+
* @NVMF_ADDR_FAMILY_IP6: AF_INET6: IPv6 address family.
3960+
* @NVMF_ADDR_FAMILY_IB: AF_IB: InfiniBand address family.
3961+
* @NVMF_ADDR_FAMILY_FC: Fibre Channel address family.
3962+
* @NVMF_ADDR_FAMILY_LOOP: Intra-host Transport (i.e., loopback), reserved
3963+
* for host usage.
3964+
*/
3965+
enum nvmf_addr_family {
39333966
NVMF_ADDR_FAMILY_PCI = 0,
39343967
NVMF_ADDR_FAMILY_IP4 = 1,
39353968
NVMF_ADDR_FAMILY_IP6 = 2,
39363969
NVMF_ADDR_FAMILY_IB = 3,
39373970
NVMF_ADDR_FAMILY_FC = 4,
3971+
NVMF_ADDR_FAMILY_LOOP = 254,
39383972
};
39393973

39403974
/**
3941-
* enum - Transport Requirements codes for Discovery Log Page entry TREQ field
3975+
* enum nvmf_treq - Transport Requirements codes for Discovery Log Page entry TREQ field
39423976
* @NVMF_TREQ_NOT_SPECIFIED: Not specified
39433977
* @NVMF_TREQ_REQUIRED: Required
39443978
* @NVMF_TREQ_NOT_REQUIRED: Not Required
@@ -3952,26 +3986,26 @@ enum nvmf_treq {
39523986
};
39533987

39543988
/**
3955-
* enum - RDMA QP Service Type codes for Discovery Log Page entry TSAS
3956-
* RDMA_QPTYPE field
3989+
* enum nvmf_rdma_qptype - RDMA QP Service Type codes for Discovery Log Page
3990+
* entry TSAS RDMA_QPTYPE field
39573991
* @NVMF_RDMA_QPTYPE_CONNECTED: Reliable Connected
39583992
* @NVMF_RDMA_QPTYPE_DATAGRAM: Reliable Datagram
39593993
*/
3960-
enum {
3994+
enum nvmf_rdma_qptype {
39613995
NVMF_RDMA_QPTYPE_CONNECTED = 1,
39623996
NVMF_RDMA_QPTYPE_DATAGRAM = 2,
39633997
};
39643998

39653999
/**
3966-
* enum - RDMA Provider Type codes for Discovery Log Page entry TSAS
3967-
* RDMA_PRTYPE field
4000+
* enum nvmf_rdma_prtype - RDMA Provider Type codes for Discovery Log Page
4001+
* entry TSAS RDMA_PRTYPE field
39684002
* @NVMF_RDMA_PRTYPE_NOT_SPECIFIED: No Provider Specified
39694003
* @NVMF_RDMA_PRTYPE_IB: InfiniBand
39704004
* @NVMF_RDMA_PRTYPE_ROCE: InfiniBand RoCE
39714005
* @NVMF_RDMA_PRTYPE_ROCEV2: InfiniBand RoCEV2
39724006
* @NVMF_RDMA_PRTYPE_IWARP: iWARP
39734007
*/
3974-
enum nvme_rdma_prtype {
4008+
enum nvmf_rdma_prtype {
39754009
NVMF_RDMA_PRTYPE_NOT_SPECIFIED = 1,
39764010
NVMF_RDMA_PRTYPE_IB = 2,
39774011
NVMF_RDMA_PRTYPE_ROCE = 3,
@@ -3980,31 +4014,43 @@ enum nvme_rdma_prtype {
39804014
};
39814015

39824016
/**
3983-
* enum - RDMA Connection Management Service Type codes for Discovery Log Page
3984-
* entry TSAS RDMA_CMS field
4017+
* enum nvmf_rdma_cms - RDMA Connection Management Service Type codes for
4018+
* Discovery Log Page entry TSAS RDMA_CMS field
39854019
* @NVMF_RDMA_CMS_RDMA_CM: Sockets based endpoint addressing
39864020
*
39874021
*/
3988-
enum {
4022+
enum nvmf_rdma_cms {
39894023
NVMF_RDMA_CMS_RDMA_CM = 1,
39904024
};
39914025

39924026
/**
3993-
* enum -
3994-
* @NVMF_TCP_SECTYPE_NONE: No Security
3995-
* @NVMF_TCP_SECTYPE_TLS: Transport Layer Security
4027+
* enum nvmf_tcp_sectype - Transport Specific Address Subtype Definition for
4028+
* NVMe/TCP Transport
4029+
* @NVMF_TCP_SECTYPE_NONE: No Security
4030+
* @NVMF_TCP_SECTYPE_TLS: Transport Layer Security version 1.2
4031+
* @NVMF_TCP_SECTYPE_TLS13: Transport Layer Security version 1.3 or a subsequent
4032+
* version. The TLS protocol negotiates the version and
4033+
* cipher suite for each TCP connection.
39964034
*/
3997-
enum {
4035+
enum nvmf_tcp_sectype {
39984036
NVMF_TCP_SECTYPE_NONE = 0,
39994037
NVMF_TCP_SECTYPE_TLS = 1,
4000-
};
4001-
4002-
/**
4003-
* struct nvmf_discovery_log -
4004-
* @genctr:
4005-
* @numrec:
4006-
* @recfmt:
4007-
* @entries:
4038+
NVMF_TCP_SECTYPE_TLS13 = 2,
4039+
};
4040+
4041+
/**
4042+
* struct nvmf_discovery_log - Discovery Log Page (Log Identifier 70h)
4043+
* @genctr: Generation Counter (GENCTR): Indicates the version of the discovery
4044+
* information, starting at a value of 0h. For each change in the
4045+
* Discovery Log Page, this counter is incremented by one. If the value
4046+
* of this field is FFFFFFFF_FFFFFFFFh, then the field shall be cleared
4047+
* to 0h when incremented (i.e., rolls over to 0h).
4048+
* @numrec: Number of Records (NUMREC): Indicates the number of records
4049+
* contained in the log.
4050+
* @recfmt: Record Format (RECFMT): Specifies the format of the Discovery Log
4051+
* Page. If a new format is defined, this value is incremented by one.
4052+
* The format of the record specified in this definition shall be 0h.
4053+
* @entries: Discovery Log Page Entries - see &struct nvmf_disc_log_entry.
40084054
*/
40094055
struct nvmf_discovery_log {
40104056
__le64 genctr;

0 commit comments

Comments
 (0)