Hello Roland!
I created this patch against your libibverbs git, stable branch.
Regards
Nam
increment counter comp_events_completed only if channel is set
this will prevent the while loop below in ibv_cmd_destroy_cq() to
hang if consumer calls ibv_ack_cq_events() without any assigned
channel
int ibv_cmd_destroy_cq(struct ibv_cq *cq)
{ ...
pthread_mutex_lock(&cq->mutex);
while (cq->comp_events_completed != resp.comp_events_reported ||
cq->async_events_completed != resp.async_events_reported)
Signed-off-by: Hoang-Nam Nguyen <[EMAIL PROTECTED]>
---
src/verbs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/verbs.c b/src/verbs.c
index f5cf4d3..3460844 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -344,6 +344,8 @@ default_symver(__ibv_get_cq_event, ibv_get_cq_event);
void __ibv_ack_cq_events(struct ibv_cq *cq, unsigned int nevents)
{
+ if (!cq->channel)
+ return;
pthread_mutex_lock(&cq->mutex);
cq->comp_events_completed += nevents;
pthread_cond_signal(&cq->cond);
--
1.5.2
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general