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

nvmf: move NVMe qpair allocation to direct.c



Change-Id: Ice167a5ec158e6e60c1c4b67bc7eeca80b262de2
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent cc85d7ef
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -264,6 +264,12 @@ nvmf_direct_ctrlr_complete_aer(void *arg, const struct spdk_nvme_cpl *cpl)
static int
nvmf_direct_ctrlr_attach(struct spdk_nvmf_subsystem *subsystem)
{
	subsystem->dev.direct.io_qpair = spdk_nvme_ctrlr_alloc_io_qpair(subsystem->dev.direct.ctrlr, 0);
	if (subsystem->dev.direct.io_qpair == NULL) {
		SPDK_ERRLOG("spdk_nvme_ctrlr_alloc_io_qpair() failed\n");
		return -1;
	}

	return 0;
}

+0 −6
Original line number Diff line number Diff line
@@ -315,12 +315,6 @@ nvmf_subsystem_add_ctrlr(struct spdk_nvmf_subsystem *subsystem,
{
	subsystem->dev.direct.ctrlr = ctrlr;
	subsystem->dev.direct.pci_addr = *pci_addr;
	/* Assume that all I/O will be handled on one thread for now */
	subsystem->dev.direct.io_qpair = spdk_nvme_ctrlr_alloc_io_qpair(ctrlr, 0);
	if (subsystem->dev.direct.io_qpair == NULL) {
		SPDK_ERRLOG("spdk_nvme_ctrlr_alloc_io_qpair() failed\n");
		return -1;
	}

	subsystem->ops->set_aer_callback(subsystem);
	return 0;
+6 −0
Original line number Diff line number Diff line
@@ -117,6 +117,12 @@ spdk_nvme_detach(struct spdk_nvme_ctrlr *ctrlr)
	return -1;
}

struct spdk_nvme_qpair *
spdk_nvme_ctrlr_alloc_io_qpair(struct spdk_nvme_ctrlr *ctrlr, enum spdk_nvme_qprio qprio)
{
	return NULL;
}

int32_t
spdk_nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_completions)
{
+0 −6
Original line number Diff line number Diff line
@@ -137,12 +137,6 @@ spdk_nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_
	return -1;
}

struct spdk_nvme_qpair *
spdk_nvme_ctrlr_alloc_io_qpair(struct spdk_nvme_ctrlr *ctrlr, enum spdk_nvme_qprio qprio)
{
	return NULL;
}

int
spdk_nvme_detach(struct spdk_nvme_ctrlr *ctrlr)
{