From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: Kernel fast memory registration API proposal [RFC] Date: Mon, 20 Jul 2015 10:23:40 -0600 Message-ID: <20150720162340.GB18336@obsidianresearch.com> References: <559F8BD1.9080308@dev.mellanox.co.il> <20150715073233.GA11535@infradead.org> <20150715170750.GA23588@obsidianresearch.com> <55A7A1B0.5000808@dev.mellanox.co.il> <20150716180806.GC3680@obsidianresearch.com> <55AB36A4.1070102@dev.mellanox.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <55AB36A4.1070102-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sagi Grimberg Cc: Christoph Hellwig , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Steve Wise , Or Gerlitz , Oren Duer , Chuck Lever , Bart Van Assche , Liran Liss , "Hefty, Sean" , Doug Ledford , Tom Talpey List-Id: linux-rdma@vger.kernel.org On Sun, Jul 19, 2015 at 08:33:24AM +0300, Sagi Grimberg wrote: > I was thinking that the user won't explicitly say which key it registers > and it will be decided from the registration itself. > Meaning, the registration code will do: Please don't.. > if (access | (IB_ACCESS_REMOTE_READ | IB_ACCESS_REMOTE_WRITE) > register rkey... > else > register lkey... > > Will that work with iWARP? or will this break because > iWARP needs REMOTE_WRITE for lkeys? Right, it will break. Access flags are only weakly related to lkey/rkey. It needs to be explicit. We have spots in the API that take lkeys and other spots the take rkeys - the caller must always know the intended use of the key it is requesting, there is no reason not to describe that explicitly. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html