nvmf: move NVMe qpair allocation to direct.c

Change-Id: Ice167a5ec158e6e60c1c4b67bc7eeca80b262de2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-03-03 16:09:17 -07:00 committed by Jim Harris
parent cc85d7ef68
commit b592cf6cdf
4 changed files with 12 additions and 12 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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)
{

View File

@ -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)
{