[ofa-general] question about ack of completion/async events in libibverbs

Dotan Barak dotanb at dev.mellanox.co.il
Wed Sep 5 07:55:35 PDT 2007


Hi Roland.

Here is the code from the libibverbs that handles the destroy CQ:

        pthread_mutex_lock(&cq->mutex);
        while (cq->comp_events_completed  != resp.comp_events_reported ||
               cq->async_events_completed != resp.async_events_reported)
                pthread_cond_wait(&cq->cond, &cq->mutex);
        pthread_mutex_unlock(&cq->mutex);

This code will cause for a careless programmer to loop forever if he 
acked the events (completion or async)
too many times ....

will you accept a patch that will fix this issue?

thanks
Dotan



More information about the general mailing list