nvmf: Move tx/rx descriptor management to rdma.c
This is an implementation detail of the RDMA layer. Change-Id: Ib97d6fbd593789eed0b6e746972b8882a3320995 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
41aadf1591
commit
e7dce1cfc0
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user