From d05c5538276757f90fb4e25d37a8c2c87b40e6d3 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Thu, 25 Apr 2019 15:58:44 -0700 Subject: [PATCH] rdma: don't spam people with async event messages. It used to be that we would get async events very infrequently. However, with the introduction of SRQ, this number has gone up tremendously. Change the way we report our these events so that we don't spam/confuse people running the target. Change-Id: I33070281fa854cbc17784d61bbbb870196ca8780 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452159 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/nvmf/rdma.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index 0a07f9e898..c4a6cdb732 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -2778,12 +2778,10 @@ spdk_nvmf_process_ib_event(struct spdk_nvmf_rdma_device *device) return; } - SPDK_NOTICELOG("Async event: %s\n", - ibv_event_type_str(event.event_type)); - switch (event.event_type) { case IBV_EVENT_QP_FATAL: rqpair = event.element.qp->qp_context; + SPDK_ERRLOG("Fatal event received for rqpair %p\n", rqpair); spdk_trace_record(TRACE_RDMA_IBV_ASYNC_EVENT, 0, 0, (uintptr_t)rqpair->cm_id, event.event_type); spdk_nvmf_rdma_update_ibv_state(rqpair); @@ -2794,6 +2792,7 @@ spdk_nvmf_process_ib_event(struct spdk_nvmf_rdma_device *device) rqpair = event.element.qp->qp_context; rqpair->last_wqe_reached = true; + SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Last WQE reached event received for rqpair %p\n", rqpair); /* This must be handled on the polling thread if it exists. Otherwise the timeout will catch it. */ if (rqpair->qpair.group) { spdk_thread_send_msg(rqpair->qpair.group->thread, nvmf_rdma_destroy_drained_qpair, rqpair); @@ -2809,6 +2808,7 @@ spdk_nvmf_process_ib_event(struct spdk_nvmf_rdma_device *device) * the operations that the below calls make all happen to be thread * safe. */ rqpair = event.element.qp->qp_context; + SPDK_DEBUGLOG(SPDK_LOG_RDMA, "Last sq drained event received for rqpair %p\n", rqpair); spdk_trace_record(TRACE_RDMA_IBV_ASYNC_EVENT, 0, 0, (uintptr_t)rqpair->cm_id, event.event_type); state = spdk_nvmf_rdma_update_ibv_state(rqpair); @@ -2821,6 +2821,8 @@ spdk_nvmf_process_ib_event(struct spdk_nvmf_rdma_device *device) case IBV_EVENT_COMM_EST: case IBV_EVENT_PATH_MIG: case IBV_EVENT_PATH_MIG_ERR: + SPDK_NOTICELOG("Async event: %s\n", + ibv_event_type_str(event.event_type)); rqpair = event.element.qp->qp_context; spdk_trace_record(TRACE_RDMA_IBV_ASYNC_EVENT, 0, 0, (uintptr_t)rqpair->cm_id, event.event_type); @@ -2838,6 +2840,8 @@ spdk_nvmf_process_ib_event(struct spdk_nvmf_rdma_device *device) case IBV_EVENT_CLIENT_REREGISTER: case IBV_EVENT_GID_CHANGE: default: + SPDK_NOTICELOG("Async event: %s\n", + ibv_event_type_str(event.event_type)); spdk_trace_record(TRACE_RDMA_IBV_ASYNC_EVENT, 0, 0, 0, event.event_type); break; }