> -----Original Message-----
> From: Jason Gunthorpe [mailto:[email protected]]
> Sent: Tuesday, June 30, 2015 11:21 AM
> To: Steve Wise
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]
> Subject: Re: [PATCH V2 3/5] RDMA/core: transport-independent access flags
>
> On Mon, Jun 29, 2015 at 04:36:18PM -0500, Steve Wise wrote:
> > +int rdma_device_access_flags(struct ib_pd *pd, int roles, int attrs)
> > +{
> > + int access_flags = attrs;
>
> No RDMA_MRR_SEND ?
>
Send need no explicit access flags. There is no LOCAL_READ access flag.
> > + if (roles & RDMA_MRR_RECV)
> > + access_flags |= IB_ACCESS_LOCAL_WRITE;
> > +
> > + if (roles & RDMA_MRR_WRITE_DEST)
> > + access_flags |= IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE;
>
> Is IB_ACCESS_LOCAL_WRITE needed?
>
Yes. You must have LOCAL_WRITE if you set REMOTE_WRITE.
> > + if (roles & RDMA_MRR_READ_DEST) {
> > + access_flags |= IB_ACCESS_LOCAL_WRITE;
> > + if (rdma_protocol_iwarp(pd->device,
> > + rdma_start_port(pd->device)))
> > + access_flags |= IB_ACCESS_REMOTE_WRITE;
> > + }
>
> So on iWarp if I want to issue a RDMA_READ then I have to allow the
> far side uncontrolled write access to the same memory? Is there
> something else protecting it?
>
Only the fact that the rkey of your MR setup for MRR_READ_DEST doesn't have to
be advertised to the peer application. So the peer
app doesn't know what the rkey is. But the fact is that an MR with
REMOTE_WRITE access flags can be used as the destination of
RDMA reads and RDMA writes for iWARP.
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html