perf: Ignore trtypes that were not requested by user
If perf is connecting to a subsystem with listeners of different transport types (e.g. TCP and RDMA) and the user request a specific trtype via CLI (e.g. TCP), discovery process will call probe_cb for every transport type. As result, probe_cb in perf will return `true` and undesired controllers will be created and used in IO path. This patch adds a check for trtype and trstring to ignore controllers that are not of a requested type. Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Change-Id: Id87afd03c7b38edfbbfecb5ad2239fe3e9ac9f83 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8465 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: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
05c7a2cc0f
commit
885331fe16
@ -5,6 +5,7 @@
|
||||
* All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2019-2021 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
|
||||
@ -2601,6 +2602,11 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
}
|
||||
}
|
||||
|
||||
if (trid->trtype != trid_entry->trid.trtype &&
|
||||
strcasecmp(trid->trstring, trid_entry->trid.trstring)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Set io_queue_size to UINT16_MAX, NVMe driver
|
||||
* will then reduce this to MQES to maximize
|
||||
* the io_queue_size as much as possible.
|
||||
|
Loading…
Reference in New Issue
Block a user