[ofa-general] ibverbs help

Kelly Burkhart kelly at tradebotsystems.com
Fri Oct 24 09:17:04 PDT 2008


 

> -----Original Message-----
> From: Dotan Barak [mailto:dotanba at gmail.com] 
> I think that i found a bug in you code:
> <start>
> while( (ne = ibv_poll_cq( cq_, 1, &wc )) < 1 );
> if (wc.status != IBV_WC_SUCCESS)
>         throw std::runtime_error( "Channel::read -- 
> ibv_poll_cq revealed 
> failed recv" );
> <end>
> 
> If there is a problem in the CQ and the return value is negative, you 
> won't notice it ...
> 

Thanks for the reply Dotan,

I've changed it to:

<start>
    for(;;) {
        ne = ibv_poll_cq( cq_, 5, wc );
        if (ne < 0)
            throw std::runtime_error(global.errmsg("ibv_poll_cq failed:
"));

        if (ne == 0)
            continue;

        for( int idx = 0; idx < ne; ++idx ) {
            if (wc[idx].status != IBV_WC_SUCCESS)
                throw std::runtime_error( "Channel::write -- ibv_poll_cq
revealed failed send" );
        }
        break;
    }
<end>

Same result; now we know that ibv_poll_cq is not failing.

> I'm quite sure that this is not the only issue in your code.

Since I've only been at this a few days, I'm quite certain you're right.
Unfortunately I don't know what to look for to diagnose the problem.
I'll continue to bang my head against this, in the mean time, if any of
you could suggest possible places for me to look it would be much
appreciated.

Thanks,

-Kelly



More information about the general mailing list