]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
fabrics: skip connect if the transport types don't match
authorMartin George <marting@netapp.com>
Wed, 13 Apr 2022 15:16:35 +0000 (20:46 +0530)
committerMartin George <marting@netapp.com>
Wed, 13 Apr 2022 15:45:02 +0000 (21:15 +0530)
commit58c39bbe25e0ec0d49c0a5225ab278bed08958ea
tree1a15a8c05ea2e919fd615fadd092760fffda0255
parente74b8fc61a7ba4770e9d98532fbccfd65d2449af
fabrics: skip connect if the transport types don't match

Discovery log page data may include records belonging to different
transport types. If during a nvme connect-all, a connect is attempted
on a record that doesn't match the transport type passed here, it
would end up in a connect failure for that record. For e.g. one would
see the following error if a connect is attempted on a tcp record,
but the transport type passed here is 'fc' and its associated params:

nvme_tcp: malformed src address passed: nn-0xXXXX:pn-0xYYYY

Fix this by proceeding with the connect only if the transport types
match for a given record during the connect-all.

[marting: backport from monolithic branch]
Signed-off-by: Martin George <marting@netapp.com>
fabrics.c