Bug 209213
Summary: | ib_srp: Already connected to target port with | ||
---|---|---|---|
Product: | Drivers | Reporter: | Yuri K (yuri+bugs) |
Component: | Infiniband/RDMA | Assignee: | drivers_infiniband-rdma |
Status: | NEW --- | ||
Severity: | normal | CC: | bvanassche |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.10.0-1127.19.1.el7.x86_64 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Yuri K
2020-09-09 17:21:22 UTC
The ib_srp kernel driver verifies as follows whether or not a connection to an SRP target already exists: static bool srp_conn_unique(struct srp_host *host, struct srp_target_port *target) { struct srp_target_port *t; bool ret = false; if (target->state == SRP_TARGET_REMOVED) goto out; ret = true; spin_lock(&host->target_lock); list_for_each_entry(t, &host->target_list, list) { if (t != target && target->id_ext == t->id_ext && target->ioc_guid == t->ioc_guid && target->initiator_ext == t->initiator_ext) { ret = false; break; } } spin_unlock(&host->target_lock); out: return ret; } The source code of ibsrpdm is available in https://github.com/linux-rdma/rdma-core/blob/master/srp_daemon/srp_daemon.c. Your report probably means that there is a mismatch between the code in add_non_exist_target() and the code in the kernel. Please use the kernel code as reference since it is an implementation of the following requirement from the SRP specification (see also http://www.t10.org/cgi-bin/ac.pl?t=f&f=srp2r06.pdf): The MULTICHANNEL ACTION field (see table 15) indicates how an SRP target port handles existing RDMA channels associated with the same I_T nexus. [ ... ] The INITIATOR PORT IDENTIFIER field and the TARGET PORT IDENTIFIER field specify the I_T nexus that shall be associated with this RDMA channel. I don't think I'm able to understand you. Target (ib_srpt) is using 2 cards, with 2 ports in them, with different node GUIDs and Port GUIDs. ib_srpt is exposing the service over 2 ports to IB switch for reliability. Initiators are connected to IB switch and have the following config in /etc/srp_daemon.conf: a ioc_guid=c0fec0fec0fec0fe d I'd like to get rid of those messages in dmesg (and, as I get it, endless srp_daemon connection attempts to connect to something that is already connected). All this SCSI stuff is hard for me. Thanks. In your message I read "connection attempts". That may be a misunderstanding. What I think is happening is that the srp_daemon periodically tells the ib_srp driver to relogin (through another IB port than it is currently logged in) and that the ib_srp driver reports "already logged in" (through the other port). I don't think that any network communication is triggered when ib_srp reports "Already connected". Why would it tell ib_srp to relogin if it's already logged in? I'm an end-user, I don't care. I just need to get rid of those messages. Also, the scsi host# is increasing, so I assume it consumes resources of some sort and might run out of numbers. This is clearly a bug, be it on srp daemon or ib_srp module part. Thanks. |