Skip to content

Commit 572189c

Browse files
dwsuseigaw
authored andcommitted
fabrics: Relax match on well known disc ctrl lookup
In case nvmf_add_ctrl() is called to add a well known discovery controller we also need to verify if we should ignore it (see --context command line argument of nvme-cli). Though we have to be careful not to overmatch on the lookup. That means the host_traddr and host_iface might be different for the discovery controller than the normal controllers. For example this can happen when the discovery controller is reached via different interface than the data controllers. Thus only consider the transport type, target address and trsvcid only when looking up well known discovery controllers. Signed-off-by: Daniel Wagner <[email protected]>
1 parent fa2ab27 commit 572189c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/nvme/fabrics.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,8 @@ int nvmf_add_ctrl(nvme_host_t h, nvme_ctrl_t c,
869869
nvme_for_each_subsystem(h, s) {
870870
fc = __nvme_lookup_ctrl(s, nvme_ctrl_get_transport(c),
871871
nvme_ctrl_get_traddr(c),
872-
nvme_ctrl_get_host_traddr(c),
873-
nvme_ctrl_get_host_iface(c),
872+
NULL,
873+
NULL,
874874
nvme_ctrl_get_trsvcid(c),
875875
NULL);
876876

0 commit comments

Comments
 (0)