RE: [PATCH V2 3/5] RDMA/core: transport-independent access flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jason Gunthorpe [mailto:jgunthorpe@xxxxxxxxxxxxxxxxxxxx]
> Sent: Tuesday, June 30, 2015 11:21 AM
> To: Steve Wise
> Cc: dledford@xxxxxxxxxx; roid@xxxxxxxxxxxx; sagig@xxxxxxxxxxxx; linux-rdma@xxxxxxxxxxxxxxx; infinipath@xxxxxxxxx;
> eli@xxxxxxxxxxxx; ogerlitz@xxxxxxxxxxxx; sean.hefty@xxxxxxxxx
> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux