nvmf: pass nvmf_request to nvmf_post_rdma_read()
Make nvmf_post_rdma_read() interface generic (don't require a tx_desc). Change-Id: I331a93eed4bb1912a47a88bb904cf392fcc364c6 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
a435e9eeee
commit
e067f3302d
@ -286,11 +286,12 @@ nvmf_ibv_send_wr_init(struct ibv_send_wr *wr,
|
||||
|
||||
int
|
||||
nvmf_post_rdma_read(struct spdk_nvmf_conn *conn,
|
||||
struct nvme_qp_tx_desc *tx_desc)
|
||||
struct nvmf_request *req)
|
||||
{
|
||||
struct ibv_send_wr wr, *bad_wr = NULL;
|
||||
struct nvme_qp_rx_desc *rx_desc = tx_desc->req_state.rx_desc;
|
||||
struct nvmf_request *req = &tx_desc->req_state;
|
||||
struct nvme_qp_tx_desc *tx_desc = req->tx_desc;
|
||||
struct nvme_qp_rx_desc *rx_desc = req->rx_desc;
|
||||
|
||||
int rc;
|
||||
|
||||
if (rx_desc == NULL) {
|
||||
@ -1090,7 +1091,7 @@ nvmf_process_pending_rdma(struct spdk_nvmf_conn *conn)
|
||||
SPDK_TRACELOG(SPDK_TRACE_RDMA, "Issue rdma read from pending queue: tx_desc %p\n",
|
||||
tx_desc);
|
||||
|
||||
rc = nvmf_post_rdma_read(conn, tx_desc);
|
||||
rc = nvmf_post_rdma_read(conn, &tx_desc->req_state);
|
||||
if (rc) {
|
||||
SPDK_ERRLOG("Unable to post pending rdma read descriptor\n");
|
||||
return -1;
|
||||
|
@ -80,7 +80,7 @@ struct nvme_qp_tx_desc {
|
||||
};
|
||||
|
||||
int nvmf_post_rdma_read(struct spdk_nvmf_conn *conn,
|
||||
struct nvme_qp_tx_desc *tx_desc);
|
||||
struct nvmf_request *req);
|
||||
int nvmf_post_rdma_write(struct spdk_nvmf_conn *conn,
|
||||
struct nvme_qp_tx_desc *tx_desc);
|
||||
int nvmf_post_rdma_recv(struct spdk_nvmf_conn *conn,
|
||||
|
@ -738,7 +738,7 @@ spdk_nvmf_request_prep_data(struct nvmf_request *req,
|
||||
if (xfer == SPDK_NVME_DATA_HOST_TO_CONTROLLER) {
|
||||
if (sgl->generic.type == SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK) {
|
||||
SPDK_TRACELOG(SPDK_TRACE_RDMA, "Issuing RDMA Read to get host data\n");
|
||||
ret = nvmf_post_rdma_read(conn, tx_desc);
|
||||
ret = nvmf_post_rdma_read(conn, req);
|
||||
if (ret) {
|
||||
SPDK_ERRLOG("Unable to post rdma read tx descriptor\n");
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user