[ofa-general] ibv_get_cq_event blocking forever after successfulibv_post_send...

Sean Hefty sean.hefty at intel.com
Mon May 12 16:44:34 PDT 2008


>    attr.rnr_retry = 7;

Can you drop this to 6 and see if the behavior changes?

> recv_thread (void *arg)
> {
>    struct ibv_cq        *ev_cq;
>    void                 *ev_ctx;
>    int                   ret;
>
>
>    ret = ibv_get_cq_event(comp_channel, &ev_cq, &ev_ctx);
>    if (ret) {
>        return 1;
>    }
>
>    ibv_ack_cq_events(ev_cq, 1);
>
>    ret = ibv_req_notify_cq(ev_cq, 0);
>    if (ret) {
>        return 1;
>    }
>
>    while ((rv = ibv_poll_cq(cq, 1, &wc)) == 1) {
>        switch (wc.opcode) {
>            case IBV_WC_SEND: {
>                if (wc.status == IBV_WC_SUCCESS) {
>                    if (sq_wr_id[head] != wc.wr_id) {
>                        datasz = 0;
>                        return 1;
>                    }
>                } else {
>                    retuen 1;

                     ^^^^^^
Are you sure this is the code that's running?

>                }
>                buf = (char *)send_data[head];
>                arg = (u64)send_arg[head];
>                sq_wr_id[head] = 0;
>                if (head == 19) {//max_send_wr -1
>                    head = 0;
>                } else {
>                    head += 1;
>                }
>                break;
>         }
>    }
>
> }

Where do you re-post receives?



More information about the general mailing list