Loading lib/nvmf/conn.c +11 −40 Original line number Diff line number Diff line Loading @@ -940,7 +940,7 @@ recv_error: return -1; } static int nvmf_cq_event_handler(struct spdk_nvmf_conn *conn) static int nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) { struct ibv_wc wc; struct nvme_qp_tx_desc *tx_desc; Loading Loading @@ -1051,54 +1051,25 @@ handler_error: return -1; } static int nvmf_execute_conn(struct spdk_nvmf_conn *conn) static void spdk_nvmf_conn_do_work(void *arg) { int rc = 0; struct spdk_nvmf_conn *conn = arg; /* for an active session, process any pending NVMf completions */ /* process pending NVMe device completions */ if (conn->sess) { if (conn->type == CONN_TYPE_AQ) if (conn->type == CONN_TYPE_AQ) { nvmf_check_admin_completions(conn->sess); else } else { nvmf_check_io_completions(conn->sess); } /* process all pending completions */ rc = nvmf_cq_event_handler(conn); if (rc > 0) { SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ event handler, %d CQ completions\n", rc); } else if (rc < 0) { SPDK_ERRLOG("CQ event handler error!\n"); return -1; } return 0; } /* process pending RDMA completions */ nvmf_check_rdma_completions(conn); /** \brief This is the main routine for the nvmf connection work item. Serves mainly as a wrapper for the nvmf_execute_conn() function which does the bulk of the work. This function handles connection cleanup when NVMf application is exiting or there is an error on the connection. It also drains the connection if the work item is being suspended to move to a different reactor. */ static void spdk_nvmf_conn_do_work(void *arg) { struct spdk_nvmf_conn *conn = arg; int rc; rc = nvmf_execute_conn(conn); if (rc != 0 || conn->state == CONN_STATE_EXITING || if (conn->state == CONN_STATE_EXITING || conn->state == CONN_STATE_FABRIC_DISCONNECT) { SPDK_TRACELOG(SPDK_TRACE_DEBUG, "state exiting to shutdown\n"); spdk_nvmf_conn_destruct(conn); } } Loading Loading
lib/nvmf/conn.c +11 −40 Original line number Diff line number Diff line Loading @@ -940,7 +940,7 @@ recv_error: return -1; } static int nvmf_cq_event_handler(struct spdk_nvmf_conn *conn) static int nvmf_check_rdma_completions(struct spdk_nvmf_conn *conn) { struct ibv_wc wc; struct nvme_qp_tx_desc *tx_desc; Loading Loading @@ -1051,54 +1051,25 @@ handler_error: return -1; } static int nvmf_execute_conn(struct spdk_nvmf_conn *conn) static void spdk_nvmf_conn_do_work(void *arg) { int rc = 0; struct spdk_nvmf_conn *conn = arg; /* for an active session, process any pending NVMf completions */ /* process pending NVMe device completions */ if (conn->sess) { if (conn->type == CONN_TYPE_AQ) if (conn->type == CONN_TYPE_AQ) { nvmf_check_admin_completions(conn->sess); else } else { nvmf_check_io_completions(conn->sess); } /* process all pending completions */ rc = nvmf_cq_event_handler(conn); if (rc > 0) { SPDK_TRACELOG(SPDK_TRACE_RDMA, "CQ event handler, %d CQ completions\n", rc); } else if (rc < 0) { SPDK_ERRLOG("CQ event handler error!\n"); return -1; } return 0; } /* process pending RDMA completions */ nvmf_check_rdma_completions(conn); /** \brief This is the main routine for the nvmf connection work item. Serves mainly as a wrapper for the nvmf_execute_conn() function which does the bulk of the work. This function handles connection cleanup when NVMf application is exiting or there is an error on the connection. It also drains the connection if the work item is being suspended to move to a different reactor. */ static void spdk_nvmf_conn_do_work(void *arg) { struct spdk_nvmf_conn *conn = arg; int rc; rc = nvmf_execute_conn(conn); if (rc != 0 || conn->state == CONN_STATE_EXITING || if (conn->state == CONN_STATE_EXITING || conn->state == CONN_STATE_FABRIC_DISCONNECT) { SPDK_TRACELOG(SPDK_TRACE_DEBUG, "state exiting to shutdown\n"); spdk_nvmf_conn_destruct(conn); } } Loading