Commit 0920923c authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

nvme/perf: remove PCI ID print in probe_cb



The vendor:device ID is already printed out in attach_cb, so printing it
again in probe_cb isn't that useful.

This also lets us remove the last use of spdk_pci_get_device(), allowing
it to be deprecated and removed in future patches.

Change-Id: Ie65abf136cce4d413f06594f91533ab9f9d4aca7
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405708


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent a78ddd82
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
@@ -1427,33 +1427,17 @@ static bool
probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
	 struct spdk_nvme_ctrlr_opts *opts)
{
	struct spdk_pci_addr	pci_addr;
	struct spdk_pci_device	*pci_dev;
	struct spdk_pci_id	pci_id;

	if (trid->trtype != SPDK_NVME_TRANSPORT_PCIE) {
		printf("Attaching to NVMe over Fabrics controller at %s:%s: %s\n",
		       trid->traddr, trid->trsvcid,
		       trid->subnqn);
	} else {
		if (spdk_pci_addr_parse(&pci_addr, trid->traddr)) {
			return false;
		}

		pci_dev = spdk_pci_get_device(&pci_addr);
		if (!pci_dev) {
			return false;
		}

		if (g_disable_sq_cmb) {
			opts->use_cmb_sqs = false;
		}

		pci_id = spdk_pci_device_get_id(pci_dev);

		printf("Attaching to NVMe Controller at %s [%04x:%04x]\n",
		       trid->traddr,
		       pci_id.vendor_id, pci_id.device_id);
		printf("Attaching to NVMe Controller at %s\n",
		       trid->traddr);
	}

	/* Set io_queue_size to UINT16_MAX, NVMe driver