[openib-general] Re: Fwd: [Bug 91] sizeof(srp_indirect_buf) wrong on 64-bit platforms

Arne Redlich arne.redlich at xiranet.com
Tue May 23 00:10:05 PDT 2006


Roland Dreier <rdreier at cisco.com> writes:

>  > Roland, maybe this means we need scsi/srp.h in svn for now?
>  > svn is supposed to work on 2.6.16 ...
>
> As far as I can tell the bug in the header has no effect on how the IB
> SRP initiator works.

Roland,

I'm afraid it *does* have an effect, unfortunately. There's the following code in ib_srp.c::srp_map_data(), around the lines 540 - 550:

      struct srp_indirect_buf *buf = (void *) cmd->add_data;

      /* snip */

      buf->table_desc.va  = cpu_to_be64(req->cmd->dma +
                                        sizeof *cmd +
                                        sizeof *buf);

So if a target actually RDMA Reads the indirect descriptor table, it will use a wrong address.

Arne
-- 
Arne Redlich
Xiranet Communications GmbH



More information about the general mailing list