> 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

Is there any valid reason a consumer would ack events if no channel is
set?  There's no way to get an event to ack in that case, as far as I know.

Maybe the real bug is in:

        while (cq->comp_events_completed  != resp.comp_events_reported ||
               cq->async_events_completed != resp.async_events_reported)

it might be safer to change the != to a < (actually to a subtraction
to handle wraparound), just to avoid hanging if someone accidentally
acks too many events.
_______________________________________________
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

Reply via email to