nvmf: request struct now has a pointer to conn

The request needs to know which connection specifically
it is associated with.

Change-Id: I492b9968b4d2e307b5af44edee0778478b32d2ba
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Ben Walker 2016-06-24 11:10:13 -07:00
parent 63da8147ed
commit a4cbf50037
3 changed files with 4 additions and 4 deletions

View File

@ -839,7 +839,7 @@ static int nvmf_recv(struct spdk_nvmf_conn *conn, struct ibv_wc *wc)
nvmf_active_tx_desc(tx_desc);
req = &tx_desc->req_state;
req->session = conn->sess;
req->conn = conn;
req->tx_desc = tx_desc;
req->rx_desc = rx_desc;
req->length = 0;

View File

@ -96,7 +96,7 @@ command_fail:
int
nvmf_process_admin_cmd(struct nvmf_request *req)
{
struct nvmf_session *session = req->session;
struct nvmf_session *session = req->conn->sess;
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
struct spdk_nvme_cpl *response = &req->rsp->nvme_cpl;
struct spdk_nvmf_subsystem *subsystem = session->subsys;
@ -373,7 +373,7 @@ passthrough:
int
nvmf_process_io_cmd(struct nvmf_request *req)
{
struct nvmf_session *session = req->session;
struct nvmf_session *session = req->conn->sess;
struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;
struct spdk_nvme_cpl *response;
struct spdk_nvmf_subsystem *subsystem = session->subsys;

View File

@ -59,7 +59,7 @@ SPDK_STATIC_ASSERT(sizeof(union nvmf_c2h_msg) == 16, "Incorrect size");
#define NVMF_C2H_MAX_MSG (sizeof(union nvmf_c2h_msg))
struct nvmf_request {
struct nvmf_session *session;
struct spdk_nvmf_conn *conn;
struct nvme_qp_tx_desc *tx_desc;
struct nvme_qp_rx_desc *rx_desc;
uint16_t cid; /* command identifier */