Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp287114pxf; Tue, 6 Apr 2021 22:35:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx192O+ebC5lz5pV2scr2pVQE1IahtldXRA0f68x849bfkFvq7Cv7zFGEyNopWbk1YUQpa8 X-Received: by 2002:a05:6638:1a6:: with SMTP id b6mr1749280jaq.116.1617773735092; Tue, 06 Apr 2021 22:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617773735; cv=none; d=google.com; s=arc-20160816; b=UW0B2wHWSOTMbO2ooNfDdgW1mI+KeJ0Sdx7U/AyR2CF8aKabvxQhBFw3ft8b7Pku9M ofNbG4qDYarsYdg64ya8zUbCBwSrGXpFtPWwPJBAi+KJwbeQAKRj2DKWcUOdvOoW6WUB oSJzVKjgXy2gpufPLErukrNNaa22vmfuCGc00G6qyeMhj7ztFIp8etSr9P+NFQP9mki1 X6CE0JBArdAuTswJ3YQ9sRYPdJme0NBmW4SOwxa/0sDUAvACh9tnbaKHAP3OlcPWeIrT MB28/KF12lFc0eKBBtw6x3uCxhqpp2MiNP4BA/A6FkyzmTNc9r0HCeggtM75G4LpM7u/ +uag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6K24cP8Hlxgu1Eb7bKKZecj+kVU4ngsuKR9g3O/ZwwY=; b=L4URErMfUr52gZA/5r5ana+/WnWyUGAoyvrLuPMSBEPt6wpoBmqPJgsY6FeTbr5Me0 jTjW+i7aOqZtRTs6MkEpHuqrjAah74uwUR8BDIY/t5uXLIwhzH9PNtV1TLvWQTDYaCd4 oDaYHuYkFQ7cW/zlLGCE3CiGtDxNDqZ1GaWNtTQHb6NnxkfnKZa61glBndqLkYbaaybZ U68iuvoDYQxqKe52vOsWdlVFQHzR9lEt4rrPCJPCFXZofVc4jfHgvMRt3gKvtlNA3RaW O87yaO5DGSmUvOixdkfvWrX/vQe4mKUyCIgGkvqKxQyNiyNsK/w90ozxIrt5E179ckqd t5YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si20178200ioo.37.2021.04.06.22.35.21; Tue, 06 Apr 2021 22:35:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243428AbhDFOzL (ORCPT + 99 others); Tue, 6 Apr 2021 10:55:11 -0400 Received: from verein.lst.de ([213.95.11.211]:54860 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239488AbhDFOzL (ORCPT ); Tue, 6 Apr 2021 10:55:11 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 6FA6868B02; Tue, 6 Apr 2021 16:54:57 +0200 (CEST) Date: Tue, 6 Apr 2021 16:54:57 +0200 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , Leon Romanovsky , Bart Van Assche , Doug Ledford , Avihai Horon , Adit Ranadive , Anna Schumaker , Ariel Elior , Bernard Metzler , Chuck Lever , "David S. Miller" , Dennis Dalessandro , Devesh Sharma , Faisal Latif , Jack Wang , Jakub Kicinski , "J. Bruce Fields" , Jens Axboe , Karsten Graul , Keith Busch , Lijun Ou , linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, Max Gurtovoy , Max Gurtovoy , "Md. Haris Iqbal" , Michael Guralnik , Michal Kalderon , Mike Marciniszyn , Naresh Kumar PBS , netdev@vger.kernel.org, Potnuri Bharat Teja , rds-devel@oss.oracle.com, Sagi Grimberg , samba-technical@lists.samba.org, Santosh Shilimkar , Selvin Xavier , Shiraz Saleem , Somnath Kotur , Sriharsha Basavapatna , Steve French , Trond Myklebust , VMware PV-Drivers , Weihang Li , Yishai Hadas , Zhu Yanjun Subject: Re: [PATCH rdma-next 01/10] RDMA: Add access flags to ib_alloc_mr() and ib_mr_pool_init() Message-ID: <20210406145457.GA7790@lst.de> References: <20210405052404.213889-2-leon@kernel.org> <20210406052717.GA4835@lst.de> <20210406121312.GK7405@nvidia.com> <20210406123034.GA28930@lst.de> <20210406140437.GR7405@nvidia.com> <20210406141552.GA4936@lst.de> <20210406144039.GS7405@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210406144039.GS7405@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Apr 06, 2021 at 11:40:39AM -0300, Jason Gunthorpe wrote: > Yes, but the complexity is how the drivers are constructed they are > designed to reject flags they don't know about.. > > Hum, it looks like someone has already been in here and we now have a > IB_ACCESS_OPTIONAL concept. > > Something like this would be the starting point: > > [...] > > However I see only EFA actually uses IB_ACCESS_OPTIONAL, so the lead > up would be to audit all the drivers to process optional access_flags > properly. Maybe this was done, but I don't see much evidence of it.. > > Sigh. It is a big mess cleaning adventure in drivers really. Yes. When passing flags to drivers we need to have a good pattern in place for distinguishing between mandatory and optional flags. That is something everyone gets wrong at first (yourself included) and which then later needs painful untangling. So I think we need to do that anyway. > > Do we actually ever need the strict ordering semantics in the kernel? > > No, only for uverbs. Which is a pretty clear indicator that we should avoid all this ULP churn. Note that the polarity of the the flag passed to the HCA driver doesn't really matter either - we should just avoid having to deal with it in the kernel ULP API.