[openib-general] is wc valid if ib_poll_cq() returns zero
somenath
somenath at veritas.com
Fri Jul 14 14:35:24 PDT 2006
Sean Hefty wrote:
> somenath wrote:
>
>> int
>> io_complete(
>> struct ib_cq *cq,
>> void *passed_arg)
>> {
>> xxx_connection_t *arg = passed_arg;
>> xxx_status_t stat = xxx_st_ok;
>> struct ib_wc wc;
>> int count = 0;
>>
>> if (count = ib_poll_cq(cq, 1, &wc) < 0) {
>
>
> I think this evaluates ib_poll_cq(..) < 0 before doing the
> assignment. Since the expression evaluates to false, count is
> assigned 0. Can you try modifying this to:
>
> if ((count = ib_poll_cq(..)) < 0)
>
> - Sean
I added that stuff, but it didn't make a difference...it still returned
0....
thanks anyway for suggesting....
looks like, I may be getting a valid entry even if ib_poll_cq() is
returning zero...
is that possible?
I am going to try it anyway, even if the ib_poll_cq() returns zero, go
ahead and try to use the wc..
dump of wc entry from recv side, looks like many are valid entries (like
wr_id, length, op etc..)
wr_id=0x10118163c00 status=0x0 op=0x80
vendor_err=0x246 byte_len=0x2028 imm_data=0xa0367eb8
qp_num=0x404 src_qp=0x68 wc_flags=0x0
pkey_index=0x0 slid=0x0 sl=0x0
dlid_path_bits=0x0 port_num=0xff
som.
More information about the general
mailing list