diff --git a/lib/nvmf/conn.c b/lib/nvmf/conn.c index 2e93e89f9..bf242f518 100644 --- a/lib/nvmf/conn.c +++ b/lib/nvmf/conn.c @@ -74,32 +74,6 @@ static struct rte_timer g_shutdown_timer; static int nvmf_allocate_reactor(uint64_t cpumask); static void spdk_nvmf_conn_do_work(void *arg); -static void -nvmf_active_tx_desc(struct nvme_qp_tx_desc *tx_desc) -{ - struct spdk_nvmf_conn *conn; - - RTE_VERIFY(tx_desc != NULL); - conn = tx_desc->conn; - RTE_VERIFY(conn != NULL); - - STAILQ_REMOVE(&conn->rdma.qp_tx_desc, tx_desc, nvme_qp_tx_desc, link); - STAILQ_INSERT_TAIL(&conn->rdma.qp_tx_active_desc, tx_desc, link); -} - -void -nvmf_deactive_tx_desc(struct nvme_qp_tx_desc *tx_desc) -{ - struct spdk_nvmf_conn *conn; - - RTE_VERIFY(tx_desc != NULL); - conn = tx_desc->conn; - RTE_VERIFY(tx_desc->conn != NULL); - - STAILQ_REMOVE(&conn->rdma.qp_tx_active_desc, tx_desc, nvme_qp_tx_desc, link); - STAILQ_INSERT_TAIL(&conn->rdma.qp_tx_desc, tx_desc, link); -} - static struct spdk_nvmf_conn * allocate_conn(void) { diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index aead5ff7c..a714f265c 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -73,6 +73,32 @@ struct spdk_nvmf_rdma { static struct spdk_nvmf_rdma g_rdma = { }; +void +nvmf_active_tx_desc(struct nvme_qp_tx_desc *tx_desc) +{ + struct spdk_nvmf_conn *conn; + + RTE_VERIFY(tx_desc != NULL); + conn = tx_desc->conn; + RTE_VERIFY(conn != NULL); + + STAILQ_REMOVE(&conn->rdma.qp_tx_desc, tx_desc, nvme_qp_tx_desc, link); + STAILQ_INSERT_TAIL(&conn->rdma.qp_tx_active_desc, tx_desc, link); +} + +void +nvmf_deactive_tx_desc(struct nvme_qp_tx_desc *tx_desc) +{ + struct spdk_nvmf_conn *conn; + + RTE_VERIFY(tx_desc != NULL); + conn = tx_desc->conn; + RTE_VERIFY(tx_desc->conn != NULL); + + STAILQ_REMOVE(&conn->rdma.qp_tx_active_desc, tx_desc, nvme_qp_tx_desc, link); + STAILQ_INSERT_TAIL(&conn->rdma.qp_tx_desc, tx_desc, link); +} + static int nvmf_rdma_queue_init(struct spdk_nvmf_conn *conn, struct ibv_context *verbs) diff --git a/lib/nvmf/rdma.h b/lib/nvmf/rdma.h index 03d052811..b7ae8f5d0 100644 --- a/lib/nvmf/rdma.h +++ b/lib/nvmf/rdma.h @@ -95,4 +95,7 @@ void nvmf_rdma_conn_cleanup(struct spdk_nvmf_conn *conn); int nvmf_acceptor_start(void); void nvmf_acceptor_stop(void); +void nvmf_active_tx_desc(struct nvme_qp_tx_desc *tx_desc); +void nvmf_deactive_tx_desc(struct nvme_qp_tx_desc *tx_desc); + #endif /* _NVMF_RDMA_H_ */