aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/infiniband/verbs.h2
-rw-r--r--src/device.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index 88ac4bb..eab5d1b 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -341,6 +341,7 @@ enum ibv_event_type {
IBV_EVENT_QP_LAST_WQE_REACHED,
IBV_EVENT_CLIENT_REREGISTER,
IBV_EVENT_GID_CHANGE,
+ IBV_EVENT_WQ_FATAL,
};
struct ibv_async_event {
@@ -348,6 +349,7 @@ struct ibv_async_event {
struct ibv_cq *cq;
struct ibv_qp *qp;
struct ibv_srq *srq;
+ struct ibv_wq *wq;
int port_num;
} element;
enum ibv_event_type event_type;
diff --git a/src/device.c b/src/device.c
index e520295..82d928a 100644
--- a/src/device.c
+++ b/src/device.c
@@ -298,6 +298,9 @@ int __ibv_get_async_event(struct ibv_context *context,
event->element.srq = (void *) (uintptr_t) ev.element;
break;
+ case IBV_EVENT_WQ_FATAL:
+ event->element.wq = (void *) (uintptr_t) ev.element;
+ break;
default:
event->element.port_num = ev.element;
break;
@@ -357,6 +360,18 @@ void __ibv_ack_async_event(struct ibv_async_event *event)
return;
}
+ case IBV_EVENT_WQ_FATAL:
+ {
+ struct ibv_wq *wq = event->element.wq;
+
+ pthread_mutex_lock(&wq->mutex);
+ ++wq->events_completed;
+ pthread_cond_signal(&wq->cond);
+ pthread_mutex_unlock(&wq->mutex);
+
+ return;
+ }
+
default:
return;
}