There is a public API spdk_nvmf_qpair_get_listen_trid() and it can get trid of the specified qpair safely for any transport including pluggable transports. The API was overlooked when implementing the multipath feature for NVMe-oF target. trid pointer was added to struct spdk_nvmf_qpair and was used to find a subsystem listener. However, pluggable transports got seg. fault because trid of the qpair was not set. To avoid such segmentation fault for any transport, change nvmf_ctrlr_create() to use spdk_nvmf_qpair_get_listen_trid(). The struct spdk_nvmf_qpair is located in the public header file, and so leave the added trid for now. It will be deprecated eventually. Reported-by: Jacek Kalwas <jacek.kalwas@intel.com> Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I5e0bd24bd58b6ffdf1352332a179a82682f1589f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5323 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
ctrlr_bdev.c | ||
ctrlr_discovery.c | ||
ctrlr.c | ||
fc_ls.c | ||
fc.c | ||
Makefile | ||
nvmf_fc.h | ||
nvmf_internal.h | ||
nvmf_rpc.c | ||
nvmf.c | ||
rdma.c | ||
spdk_nvmf.map | ||
subsystem.c | ||
tcp.c | ||
transport.c | ||
transport.h |