From patchwork Mon Apr 5 05:23:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 12182661 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 179A0C43462 for ; Mon, 5 Apr 2021 05:24:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE70A613A1 for ; Mon, 5 Apr 2021 05:24:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232201AbhDEFYf (ORCPT ); Mon, 5 Apr 2021 01:24:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:57056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232148AbhDEFYc (ORCPT ); Mon, 5 Apr 2021 01:24:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 30A2E613A4; Mon, 5 Apr 2021 05:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617600266; bh=imvbyn97thI9yWumE7pEl40IQe358kCagE2ZGNMZU9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HZEzb+U8Ry5BOtN1qNr3CelJoI40xG7feEOzNwXvuXUEOQO3t+IeULIAKlg0xq4Ps J5AcD6+++TL27oFLWK80YU2XPT8zCB6J+XRulPpz9MTDdcSIGNm6PGnK3hChgNsqVr 8CDSLtsMRaDgk291G4zGT7zeU9k3R5bQ4k/K1kx+Z1h6TXYqxyqz4+DzkAdIiK+l+r SMXkJnWjg3vbf+UY4oiB57JeZa/Xg2MeojDuvo1VBrKI3DFPfAKqJBIeAyiLOZFCDP dCJYSeTmHUXmoR1Ihh5FvuyelpHmTPzXJhngHA6OGcoDWelbwKJWvTYXfx6QoH0SMl AxUWR/QpJ9f5Q== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Avihai Horon , Adit Ranadive , Anna Schumaker , Ariel Elior , Bart Van Assche , 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 Subject: [PATCH rdma-next 05/10] RDMA/srp: Enable Relaxed Ordering Date: Mon, 5 Apr 2021 08:23:59 +0300 Message-Id: <20210405052404.213889-6-leon@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210405052404.213889-1-leon@kernel.org> References: <20210405052404.213889-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Avihai Horon Enable Relaxed Ordering for srp. Relaxed Ordering is an optional access flag and as such, it is ignored by vendors that don't support it. Signed-off-by: Avihai Horon Reviewed-by: Max Gurtovoy Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky --- drivers/infiniband/ulp/srp/ib_srp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 8481ad769ba4..0026660c3ead 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -436,7 +436,8 @@ static struct srp_fr_pool *srp_create_fr_pool(struct ib_device *device, mr_type = IB_MR_TYPE_MEM_REG; for (i = 0, d = &pool->desc[0]; i < pool->size; i++, d++) { - mr = ib_alloc_mr(pd, mr_type, max_page_list_len, 0); + mr = ib_alloc_mr(pd, mr_type, max_page_list_len, + IB_ACCESS_RELAXED_ORDERING); if (IS_ERR(mr)) { ret = PTR_ERR(mr); if (ret == -ENOMEM) @@ -1487,9 +1488,8 @@ static int srp_map_finish_fr(struct srp_map_state *state, wr.wr.send_flags = 0; wr.mr = desc->mr; wr.key = desc->mr->rkey; - wr.access = (IB_ACCESS_LOCAL_WRITE | - IB_ACCESS_REMOTE_READ | - IB_ACCESS_REMOTE_WRITE); + wr.access = (IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ | + IB_ACCESS_REMOTE_WRITE | IB_ACCESS_RELAXED_ORDERING); *state->fr.next++ = desc; state->nmdesc++;