Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2967894pxf; Sun, 4 Apr 2021 22:27:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC2eHWo3HsbB+sZA55PtIBusx59RFSqoz1V+8QH6gKxA2Kkf3g7yWFUVkSDxg9eZoXsUJj X-Received: by 2002:a92:c748:: with SMTP id y8mr18426116ilp.37.1617600431699; Sun, 04 Apr 2021 22:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617600431; cv=none; d=google.com; s=arc-20160816; b=greUBW7t4slo0nFc3zhu+LU98BezBUUWUWOfzDedqQKeJer1GktpDbW5cdbHRkaIrE 2841CeN7JnU/67AIs+yCG7MD9NUL+SdcXSBBbQNARvEkjsIBfEJQqUiAKrkE26nu4EEo E2IOlFVEEd+ypLNpNQmaI4NFlokzUHIPalFxOgG0TKNQTRudW+rV+Zc1MxIViQth4oc2 iznWlerN+bsOK8a0H0dlN0WJTs/yBG/3k4iz0V6uvXh1odGltuqIE7x2NNf99FH7ZDtI yDaXf/xJ2tHNHmYIXRaYNlGG00vOl0BPRgtw3wWG8yn5cN0Eek1H/Y3qskniU7biolHB WeRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EX480/v8AIuPf0AIyHOhc5jXjU+g/j5tXs1+opOsR2s=; b=PNOjHZuOLQCbrDHYKhQgWe84GfxlXYRZYkU5PbeQIYRAKkCIbtfNF7T+ojomiqv8xi s7bnXBXpk2eBdUChJju0+eWYv75doxDo1Kr8819asVrdWPDr/wUHdhC2UTJXkZ0+pbnO 4wUKHt2r7og+bTakkzYE+JiafUmUBPkJKsEirKPNDAHyTgbd2VDQ++AYEZ7cq2RZeBuM 50H4dzZnuDGfS8SK+fLWahbP3QrK9tpakSeNHgfo1+AoT5Rmp2tUW2vH6Uga5AprA9oy yFz0MOwd+6XebPZ3BnKiqWbWbAXgJLtw4U8taqKip7ylQuSTVpPcbpcsmLmwot+BYGMN p23g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gTxgWIVA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si13708862jap.68.2021.04.04.22.26.55; Sun, 04 Apr 2021 22:27:11 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gTxgWIVA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232330AbhDEFYy (ORCPT + 99 others); Mon, 5 Apr 2021 01:24:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:57808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbhDEFYt (ORCPT ); Mon, 5 Apr 2021 01:24:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 98D37613A5; Mon, 5 Apr 2021 05:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617600283; bh=dMWjVf2aUxdb7ZrnGVveey6nby3LeCk61fbfNTM9fl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gTxgWIVArORnsJVcmrlN8d/R5yi5c6bOrNBzElohC5vaA3tthZxAmBXekzQxLPZt1 znzexk81BrDTA5rsNCCVYOvwwlFDnzS86wc5yRwGWJWRt2aJNEqlhMh8X3Yin5MnUg egYUxDlxiP5r1F4WaDRJYqPSPkYbHdcFvkPU39s/4JSgSFdlIFeQGgL/MD/zmAqfpV quoKIMb/Ra/cj5B4Sy7YeCi7JhHJGHVrBLPV05lfGEptIVl6j3TYWFL1RzMBwdrQlr KEGiPPxsxY/9/6wsL1nkOvjaFxpOYMEgu7CPBdfRPgPfo6Fuhy9FxKi4vnWqOGX83B 98mrg+Kp01FKw== 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 10/10] xprtrdma: Enable Relaxed Ordering Date: Mon, 5 Apr 2021 08:24:04 +0300 Message-Id: <20210405052404.213889-11-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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Avihai Horon Enable Relaxed Ordering for xprtrdma. 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: Michael Guralnik Signed-off-by: Leon Romanovsky --- net/sunrpc/xprtrdma/frwr_ops.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c index cfbdd197cdfe..f9334c0a1a13 100644 --- a/net/sunrpc/xprtrdma/frwr_ops.c +++ b/net/sunrpc/xprtrdma/frwr_ops.c @@ -135,7 +135,8 @@ int frwr_mr_init(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr *mr) struct ib_mr *frmr; int rc; - frmr = ib_alloc_mr(ep->re_pd, ep->re_mrtype, depth, 0); + frmr = ib_alloc_mr(ep->re_pd, ep->re_mrtype, depth, + IB_ACCESS_RELAXED_ORDERING); if (IS_ERR(frmr)) goto out_mr_err; @@ -339,9 +340,10 @@ struct rpcrdma_mr_seg *frwr_map(struct rpcrdma_xprt *r_xprt, reg_wr = &mr->frwr.fr_regwr; reg_wr->mr = ibmr; reg_wr->key = ibmr->rkey; - reg_wr->access = writing ? - IB_ACCESS_REMOTE_WRITE | IB_ACCESS_LOCAL_WRITE : - IB_ACCESS_REMOTE_READ; + reg_wr->access = + (writing ? IB_ACCESS_REMOTE_WRITE | IB_ACCESS_LOCAL_WRITE : + IB_ACCESS_REMOTE_READ) | + IB_ACCESS_RELAXED_ORDERING; mr->mr_handle = ibmr->rkey; mr->mr_length = ibmr->length; -- 2.30.2