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:
parent
cc85d7ef68
commit
b592cf6cdf
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user