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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I457845e74d4e8150c9376f9bc253a8ee1ad8c1d3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13947
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Shuhei Matsumoto 2022-08-10 17:13:13 +09:00 committed by Tomasz Zawadzki
parent cd65512d08
commit f1dabc228f
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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 */