Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3564189pxf; Mon, 5 Apr 2021 15:57:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTAyPQH1RiZwZYT7Cm5Ou+6dksWi3nCvTnjIQ8tf3/r0NMSxUd/a5vkXIe0B00W8glOU9e X-Received: by 2002:a05:6e02:1c4b:: with SMTP id d11mr21781638ilg.66.1617663439029; Mon, 05 Apr 2021 15:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617663439; cv=none; d=google.com; s=arc-20160816; b=zMwqGefw7KFLlyUDnWHk4amAQsL2gntfSciqzrqR4TQzHvsUIpSSm2zzlsqpZtPsSU 4is+BHPMknVURUX2wyGj8EEGvMjYzUown3+TwPW54XwCQCpiaRgP2+66n1sVjLjl5ZzD Ia5lBFmGXe5E3mX3HEYfAEqdm1uAHIYr4OTi2r32bm5MsUsiMQ96iUegkUU37K2pnXTw ilBhrh/4ewthE/9Qjb67fhcsLjELLwZ6/t/A/LfYgSaAOaCl+Gd7rpN2CuabbuFDYULK BeKYgbD+wYUJqxmI0W7MAii9JZMNCCuWxUjvji0+E7zL3klPhs3XIMnt+nLcZkKSZqFZ oGow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=s6/xO6zDlOcf9rGpsVwdjh2veGTAn/Y535MvhVK0maI=; b=Z2fjIxd/BFwHyfV0/My6VtORQox5T1SrqOtshNIr3fcpKGQC+TH9DnrlM+BbJdylZ6 LhWZZK9VSFFvuksKoQ42KBggxz60m3tvvrbJUOXx9y2fWEOcmj6WXkjsl5qtwRDDCStx gY6+uO+FDreLD83ivT2vkzawvnuIimcmSXpeyIFbk9RDjoDLhaqhlIEzqYPw/08X9PtH AX9OrDJDsMoULvWmoADx6h1IjCs9Y1sb2xqb7A8CcOMgkNs9i4ewYSiH5GCZjCP35iTb PlWbdRnqeQK+bfV2mJ456C6FkAx9vPGLVjIqGuAhRY8IQHHHty6dhpb2OWGo0aCnVCW5 lT8Q== 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 g16si1124808ilr.129.2021.04.05.15.56.55; Mon, 05 Apr 2021 15:57:19 -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 S237992AbhDEP11 (ORCPT + 99 others); Mon, 5 Apr 2021 11:27:27 -0400 Received: from mail-pj1-f49.google.com ([209.85.216.49]:52087 "EHLO mail-pj1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232714AbhDEP10 (ORCPT ); Mon, 5 Apr 2021 11:27:26 -0400 Received: by mail-pj1-f49.google.com with SMTP id s21so6260363pjq.1; Mon, 05 Apr 2021 08:27:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s6/xO6zDlOcf9rGpsVwdjh2veGTAn/Y535MvhVK0maI=; b=h9EtD5dygBgSwlVuY9Jq6t+X2QFeSKBAkLNb8O5qKyvy3AGmgN7kScbfC7a9jLtSQi Z1sS31l/OWdoApZgs07IyDTIt4Vt9unJzh2oUmBlZ1dcZbglfJyRHc343UVzS0J/gB69 Eia2NxXoItDcvXbhXr5JyUWefkOUynENpPCvCqLT9uJG+gOFHktluYVVAQujWgyZ1CXH opKRO9ZSgM82jTPeMpxBKC0oaMvZJI5J2mbEq8lDlJOJniapJWlAacenFoG7FVAhIWso riUNBcde/x8w0fA7n4Oc8Niicf6zMOAoLtUKfLTObExCAUybVvDZH1RCzngmYP1J1Z/E BRNQ== X-Gm-Message-State: AOAM53271sAdFQyyNyFbp7r9nebheGfwuj34uN9tQFpPpqb7rY50RQiR Js8Q6+WcdfOTSJSj21l2Ok0= X-Received: by 2002:a17:90b:33d0:: with SMTP id lk16mr14383989pjb.115.1617636440145; Mon, 05 Apr 2021 08:27:20 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:20c0:5960:9793:8deb? ([2601:647:4000:d7:20c0:5960:9793:8deb]) by smtp.gmail.com with ESMTPSA id p11sm16137366pjo.48.2021.04.05.08.27.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Apr 2021 08:27:19 -0700 (PDT) Subject: Re: [PATCH rdma-next 01/10] RDMA: Add access flags to ib_alloc_mr() and ib_mr_pool_init() To: Leon Romanovsky , Doug Ledford , Jason Gunthorpe , Christoph Hellwig Cc: Avihai Horon , Adit Ranadive , Anna Schumaker , Ariel Elior , Bernard Metzler , Christoph Hellwig , 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 References: <20210405052404.213889-1-leon@kernel.org> <20210405052404.213889-2-leon@kernel.org> From: Bart Van Assche Message-ID: Date: Mon, 5 Apr 2021 08:27:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210405052404.213889-2-leon@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 4/4/21 10:23 PM, Leon Romanovsky wrote: > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > index bed4cfe50554..59138174affa 100644 > --- a/include/rdma/ib_verbs.h > +++ b/include/rdma/ib_verbs.h > @@ -2444,10 +2444,10 @@ struct ib_device_ops { > struct ib_udata *udata); > int (*dereg_mr)(struct ib_mr *mr, struct ib_udata *udata); > struct ib_mr *(*alloc_mr)(struct ib_pd *pd, enum ib_mr_type mr_type, > - u32 max_num_sg); > + u32 max_num_sg, u32 access); > struct ib_mr *(*alloc_mr_integrity)(struct ib_pd *pd, > u32 max_num_data_sg, > - u32 max_num_meta_sg); > + u32 max_num_meta_sg, u32 access); > int (*advise_mr)(struct ib_pd *pd, > enum ib_uverbs_advise_mr_advice advice, u32 flags, > struct ib_sge *sg_list, u32 num_sge, > @@ -4142,11 +4142,10 @@ static inline int ib_dereg_mr(struct ib_mr *mr) > } > > struct ib_mr *ib_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type, > - u32 max_num_sg); > + u32 max_num_sg, u32 access); > > -struct ib_mr *ib_alloc_mr_integrity(struct ib_pd *pd, > - u32 max_num_data_sg, > - u32 max_num_meta_sg); > +struct ib_mr *ib_alloc_mr_integrity(struct ib_pd *pd, u32 max_num_data_sg, > + u32 max_num_meta_sg, u32 access); > > /** > * ib_update_fast_reg_key - updates the key portion of the fast_reg MR > diff --git a/include/rdma/mr_pool.h b/include/rdma/mr_pool.h > index e77123bcb43b..2a0ee791037d 100644 > --- a/include/rdma/mr_pool.h > +++ b/include/rdma/mr_pool.h > @@ -11,7 +11,8 @@ struct ib_mr *ib_mr_pool_get(struct ib_qp *qp, struct list_head *list); > void ib_mr_pool_put(struct ib_qp *qp, struct list_head *list, struct ib_mr *mr); > > int ib_mr_pool_init(struct ib_qp *qp, struct list_head *list, int nr, > - enum ib_mr_type type, u32 max_num_sg, u32 max_num_meta_sg); > + enum ib_mr_type type, u32 max_num_sg, u32 max_num_meta_sg, > + u32 access); > void ib_mr_pool_destroy(struct ib_qp *qp, struct list_head *list); > > #endif /* _RDMA_MR_POOL_H */ Does the new 'access' argument only control whether or not PCIe relaxed ordering is enabled? It seems wrong to me to make enabling of PCIe relaxed ordering configurable. I think this mechanism should be enabled unconditionally if the HCA supports it. Thanks, Bart.