Commit f1dabc22 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

nvme: Add SPDK_NVME_TRANSPORT_CUSTOM_FABRICS for custom fabric transport



There was SPDK_NVME_TRANSPORT_CUSTOM but it was not usable for fabric
custom transport because spdk_nvme_trtype_is_fabrics() returned false.

Use 4097 for SPDK_NVME_TRANSPORT_CUSTOM_FABRICS and update
spdk_nvme_trtype_is_fabrics() to include SPDK_NVME_TRANSPORT_CUSTOM_FABRICS
because it is not defined in the specification.

Signed-off-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I457845e74d4e8150c9376f9bc253a8ee1ad8c1d3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13947


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent cd65512d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@ assignements.
Added a new startup RPC `accel_assign_opc` to assign/override a specific opcode to
an engine.

### nvme

Added SPDK_NVME_TRANSPORT_CUSTOM_FABRICS to enum spdk_nvme_transport_type to support custom
fabric transport. SPDK_NVME_TRANSPORT_CUSTOM was intended to be non-fabric custom transport.

## v22.05

### sock
+6 −1
Original line number Diff line number Diff line
@@ -363,6 +363,11 @@ enum spdk_nvme_transport_type {
	 * Custom Transport (Not spec defined)
	 */
	SPDK_NVME_TRANSPORT_CUSTOM = 4096,

	/**
	 * Custom Fabric Transport (Not spec defined)
	 */
	SPDK_NVME_TRANSPORT_CUSTOM_FABRICS = 4097,
};

static inline bool spdk_nvme_trtype_is_fabrics(enum spdk_nvme_transport_type trtype)
@@ -370,7 +375,7 @@ static inline bool spdk_nvme_trtype_is_fabrics(enum spdk_nvme_transport_type trt
	/* We always define non-fabrics trtypes outside of the 8-bit range
	 * of NVMe-oF trtype.
	 */
	return trtype <= UINT8_MAX;
	return trtype <= UINT8_MAX || trtype == SPDK_NVME_TRANSPORT_CUSTOM_FABRICS;
}

/* typedef added for coding style reasons */