[rds-devel] IB/rds: fix for "RDS RDMA mode does not work on QLogic HCAs"

Andy Grover andy.grover at oracle.com
Sat Dec 6 23:33:28 PST 2008


Or Gerlitz wrote:
> Ralph Campbell wrote:
>> @@ -789,15 +789,16 @@ int rds_ib_xmit_rdma(struct rds_connecti
>>  
>> -            remote_addr += sg_dma_len(scat);
>> +            remote_addr += len;
>>   
> 
> Andy, Ralph, lets be conservative/strict and stick to conversions...
> that is use ib_sg_dma_len (below), OK?

Does it introduce a bug? I don't believe it does.

In fact, I think if we put it back and set remote_addr using
ib_sg_dma_len(), then a reader of the code might be confused why
remote_addr was incremented with that function, but right above we have
"sent += len", so why's the code doing it both ways? The only reason
would be if ib_sga_dma_len() != len, which of course it won't ever be.

So the patch fixes the original bug and makes the loop less confusing.

Regards -- Andy



More information about the rds-devel mailing list