Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nvme: add spdk_nvme_ctrlr_is_fabrics()
We map the SPDK_NVME_TRANSPORT_* values directly to the NVMe-oF trtype values. Since PCIe isn't Fabrics, we choose 256 which is outside of the 8-bit trtype range of values. So we can just check if trtype >= 256 to determine if the trid is for fabrics or not. This is preferable to checking PCIE || VFIOUSER in case additional non-fabrics transport types are added in the future. I considered taking a trid as the parameter instead, but went this route since it is consistent with the existing spdk_nvme_ctrlr_is_discovery(). Signed-off-by: Jim Harris <[email protected]> Change-Id: Ib62ff4d30549b2324486c81f2dce67f0f1741e9b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8077 Tested-by: SPDK CI Jenkins <[email protected]> Community-CI: Mellanox Build Bot Reviewed-by: Ziye Yang <[email protected]> Reviewed-by: Aleksey Marchuk <[email protected]> Reviewed-by: Changpeng Liu <[email protected]>
- Loading branch information