nvme/fabrics: Fix trid trstring populate
After correct trstring initialization, it is overwritten with trstring value of the current probe ctx. That leads to a problem when initiator connects to a sbusystem with listeners of different transport types (e.g. TCP and RDMA). If probe_ctx has TCP type, than discovery probe initialized probe trid with trtype=RDMA and trstring=TCP. As results, SPDK creates TCP controller with trtype=RDMA and we hit assert in nvme_tcp_qpair function. Change-Id: I9355450c40c58fa55b016220703f6f7ae36b2571 Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8464 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
2c34af8bff
commit
05c7a2cc0f
@ -3,6 +3,7 @@
|
||||
*
|
||||
* Copyright (c) Intel Corporation. All rights reserved.
|
||||
* Copyright (c) 2020 Mellanox Technologies LTD. All rights reserved.
|
||||
* Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -191,7 +192,6 @@ nvme_fabric_discover_probe(struct spdk_nvmf_discovery_log_page_entry *entry,
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf(trid.trstring, sizeof(trid.trstring), "%s", probe_ctx->trid.trstring);
|
||||
trid.adrfam = entry->adrfam;
|
||||
|
||||
/* Ensure that subnqn is null terminated. */
|
||||
|
Loading…
Reference in New Issue
Block a user