Skip to content

Commit bbb443e

Browse files
Hannes Reineckekeithbusch
authored andcommitted
nvme-fcloop: implement 'host_traddr'
Implement the 'host_traddr' callback to display the host transport address for nvmet debugfs. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: James Smart <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 99032e9 commit bbb443e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/nvme/target/fcloop.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,16 @@ fcloop_t2h_host_release(void *hosthandle)
492492
/* host handle ignored for now */
493493
}
494494

495+
static int
496+
fcloop_t2h_host_traddr(void *hosthandle, u64 *wwnn, u64 *wwpn)
497+
{
498+
struct fcloop_rport *rport = hosthandle;
499+
500+
*wwnn = rport->lport->localport->node_name;
501+
*wwpn = rport->lport->localport->port_name;
502+
return 0;
503+
}
504+
495505
/*
496506
* Simulate reception of RSCN and converting it to a initiator transport
497507
* call to rescan a remote port.
@@ -1074,6 +1084,7 @@ static struct nvmet_fc_target_template tgttemplate = {
10741084
.ls_req = fcloop_t2h_ls_req,
10751085
.ls_abort = fcloop_t2h_ls_abort,
10761086
.host_release = fcloop_t2h_host_release,
1087+
.host_traddr = fcloop_t2h_host_traddr,
10771088
.max_hw_queues = FCLOOP_HW_QUEUES,
10781089
.max_sgl_segments = FCLOOP_SGL_SEGS,
10791090
.max_dif_sgl_segments = FCLOOP_SGL_SEGS,

0 commit comments

Comments
 (0)