nvmf: spdk_nvmf_rdma_qpair now holds a pointer to its port
Change-Id: I6a733ab00b61866d68d584a330020b9cd29e25b8 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/373840 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
b2e3856057
commit
2b7b41ee5d
@ -106,6 +106,8 @@ struct spdk_nvmf_rdma_request {
|
||||
struct spdk_nvmf_rdma_qpair {
|
||||
struct spdk_nvmf_qpair qpair;
|
||||
|
||||
struct spdk_nvmf_rdma_port *port;
|
||||
|
||||
struct rdma_cm_id *cm_id;
|
||||
struct ibv_cq *cq;
|
||||
|
||||
@ -242,6 +244,7 @@ spdk_nvmf_rdma_qpair_destroy(struct spdk_nvmf_rdma_qpair *rdma_qpair)
|
||||
|
||||
static struct spdk_nvmf_rdma_qpair *
|
||||
spdk_nvmf_rdma_qpair_create(struct spdk_nvmf_transport *transport,
|
||||
struct spdk_nvmf_rdma_port *port,
|
||||
struct rdma_cm_id *id,
|
||||
uint16_t max_queue_depth, uint16_t max_rw_depth, uint32_t subsystem_id)
|
||||
{
|
||||
@ -261,6 +264,7 @@ spdk_nvmf_rdma_qpair_create(struct spdk_nvmf_transport *transport,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rdma_qpair->port = port;
|
||||
rdma_qpair->max_queue_depth = max_queue_depth;
|
||||
rdma_qpair->max_rw_depth = max_rw_depth;
|
||||
TAILQ_INIT(&rdma_qpair->incoming_queue);
|
||||
@ -615,7 +619,7 @@ nvmf_rdma_connect(struct spdk_nvmf_transport *transport, struct rdma_cm_event *e
|
||||
max_queue_depth, max_rw_depth);
|
||||
|
||||
/* Init the NVMf rdma transport connection */
|
||||
rdma_qpair = spdk_nvmf_rdma_qpair_create(transport, event->id, max_queue_depth,
|
||||
rdma_qpair = spdk_nvmf_rdma_qpair_create(transport, port, event->id, max_queue_depth,
|
||||
max_rw_depth, subsystem_id);
|
||||
if (rdma_qpair == NULL) {
|
||||
SPDK_ERRLOG("Error on nvmf connection creation\n");
|
||||
|
Loading…
Reference in New Issue
Block a user