Commit 885331fe authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

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: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Change-Id: Id87afd03c7b38edfbbfecb5ad2239fe3e9ac9f83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8465


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 05c7a2cc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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.