nvme: add ADRFAM (address family) to transport ID
This isn't used yet in the NVMe library, but it will be necessary later for supporting non-IPv4 addresses. Change-Id: I167ce63ad25b0e0c9aa192b12d764c8d078e67f9 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
9c5df2c4bf
commit
0346dd775e
@ -912,6 +912,7 @@ parse_args(int argc, char **argv)
|
||||
break;
|
||||
case 'a':
|
||||
trid.trtype = SPDK_NVME_TRANSPORT_RDMA;
|
||||
trid.adrfam = SPDK_NVMF_ADRFAM_IPV4;
|
||||
snprintf(trid.traddr, sizeof(trid.traddr), "%s", optarg);
|
||||
break;
|
||||
case 's':
|
||||
|
@ -1072,6 +1072,7 @@ register_controllers(void)
|
||||
return 0;
|
||||
}
|
||||
trid.trtype = SPDK_NVME_TRANSPORT_RDMA;
|
||||
trid.adrfam = SPDK_NVMF_ADRFAM_IPV4;
|
||||
|
||||
p = (char *)p1 + 1;
|
||||
p1 = strchr(p, ':');
|
||||
|
@ -141,6 +141,13 @@ struct spdk_nvme_transport_id {
|
||||
*/
|
||||
enum spdk_nvme_transport_type trtype;
|
||||
|
||||
/**
|
||||
* Address family of the transport address.
|
||||
*
|
||||
* For PCIe, this value is ignored.
|
||||
*/
|
||||
enum spdk_nvmf_adrfam adrfam;
|
||||
|
||||
/**
|
||||
* Transport address of the NVMe-oF endpoint. For transports which use IP
|
||||
* addressing (e.g. RDMA), this should be an IP address. For PCIe, this
|
||||
|
@ -1133,6 +1133,8 @@ nvme_rdma_ctrlr_scan(const struct spdk_nvme_transport_id *discovery_trid,
|
||||
continue;
|
||||
}
|
||||
|
||||
trid.adrfam = entry->adrfam;
|
||||
|
||||
/* Ensure that subnqn is null terminated. */
|
||||
end = memchr(entry->subnqn, '\0', SPDK_NVMF_NQN_MAX_LEN);
|
||||
if (!end) {
|
||||
|
Loading…
Reference in New Issue
Block a user