Return-Path: Received: from mga14.intel.com ([192.55.52.115]:9787 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753698AbbGWXaK convert rfc822-to-8bit (ORCPT ); Thu, 23 Jul 2015 19:30:10 -0400 From: "Hefty, Sean" To: Steve Wise , "'Christoph Hellwig'" CC: "'Sagi Grimberg'" , "'Steve Wise'" , "'Jason Gunthorpe'" , "'Tom Talpey'" , "'Doug Ledford'" , "sagig@mellanox.com" , "ogerlitz@mellanox.com" , "roid@mellanox.com" , "linux-rdma@vger.kernel.org" , "eli@mellanox.com" , "target-devel@vger.kernel.org" , "linux-nfs@vger.kernel.org" , "trond.myklebust@primarydata.com" , "bfields@fieldses.org" , "'Oren Duer'" Subject: RE: [PATCH V3 1/5] RDMA/core: Transport-independent access flags Date: Thu, 23 Jul 2015 23:30:08 +0000 Message-ID: <1828884A29C6694DAF28B7E6B8A82373A901DB80@ORSMSX109.amr.corp.intel.com> References: <20150708190842.GB11740@obsidianresearch.com> <20150708203205.GA21847@infradead.org> <20150709000337.GE16812@obsidianresearch.com> <559EF332.7060103@redhat.com> <20150709225306.GA30741@obsidianresearch.com> <559FC710.1050307@talpey.com> <20150710161108.GA19042@obsidianresearch.com> <55A24571.60902@dev.mellanox.co.il> <00e201d0be6a$e49bc910$add35b30$@opengridcomputing.com> <20150714194512.GA25887@infradead.org> <00f901d0be6f$70c96b00$525c4100$@opengridcomputing.com> <1828884A29C6694DAF28B7E6B8A82373A901C9A5@ORSMSX109.amr.corp.intel.com> <009e01d0c57a$37d5b9e0$a7812da0$@opengridcomputing.com> In-Reply-To: <009e01d0c57a$37d5b9e0$a7812da0$@opengridcomputing.com> Content-Type: text/plain; charset="Windows-1252" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: > > This may be a nit, but IMO, the use of the term 'rkey' versus 'stag' > matters. They convey different ways of finding a data > buffer. For > > example, do you locate a buffer using the stag, then verify that the > offset + length fits into the target buffer? > > Yes. HW always uses the stag to locate a record that contains the stag > state (valid or invalid), the access flags, the 8b key, the > va_base, length, PBL describing the host pages, etc. HW validates all > that before using the buffer. NOTE: An stag of 0 is the > special local-dma-lkey which HW treats differently: If the stag is 0, then > the address in the SGE is the bus/dma address itself and > no lookup of a MR/PBL/etc is needed. Stag 0 can ONLY be used by kernel > users and MUST never be accepted/used from an ingress > packet and MUST never be emitted on the wire in a READ or WRITE. > > > Or do you locate the buffer > > by address, then verify that the key matches? > > > > This is never done. These were more rhetorical questions to highlight that stag is a better choice for the name than rkey. Lkey seems better than stag, though I'd rather see lkey removed completely. I don't see where usnic, ipath, qib, or opa technically need an lkey at all.