Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2967197pxf; Sun, 4 Apr 2021 22:25:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVFo6bG4gQ+v0ND3ae8HXwX6jP6KSt/94rBz4iFHjCYdqAlCQTOHhR0dLRYh51YreU6XbA X-Received: by 2002:a05:6e02:149:: with SMTP id j9mr19361150ilr.57.1617600311800; Sun, 04 Apr 2021 22:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617600311; cv=none; d=google.com; s=arc-20160816; b=TV3iuroMacEWP8VhBuhmRPueygA+YLlypY9UgjJrVYdiuPVGj05ibPyYGvqEs99KPp MhY6uph7g2VPPMt3+ysqnUblrhcQFqTB+wqroPfwo7j23JeEgYqEUUVUSmvu9iHL3FtZ 9r1qShAleTn+37VpIcKxaB5XYi+MApvZ94K4rAEMVDbvFDrwO+N2pQ6QSdd46wUHCjZX qzPm+YFASwFcDiMr17YPJmMIqU0RJhOhoXzoTv/iBOpNcmyW1HP7Zp2x5FQ+V659/bVf KnN6P8q8UCX3v8xU0ZEi//JhsYqReran2apQ8lX65ZGXN4VVEnse6xtlnuS3M2+lv7D0 2wSg== 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=hKfh6tgk7oGjj9pyTXJ/F0Wo8o5bGN5Bcu57u0Ue6Kc=; b=lHWQdyNVxmX3SvunR2JRQXFlgOOKJFflyQPYsItSQhhYOcxcLqIJ8TqiCGUK0Q6b8w Ldx3YMPT+1hj0pfI+x7HEL9Wd5zBHWPGpKtOmzzNLzc2fvJOJ52jw0p0l+SbyK2tvupw 9BT45sUO3In3167cgDgaoGlN1UuHTFtNyVyiAunzteDgCfcU1eoUauKOaBhFzjzuJstY HgvFkLJjd/peiZjCYotSMZebzdFfiuiOFw4Aacjn7rZoLtMgOKvXNN08l3s2KhCTrz7h 8FhhLnCfTUsiFKfzUYtytuOQlg7fYUFXOfefuJ97OVVIyKLGpjmFdV2kPVmT2s+lHvry Ps2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RHoI+pUc; 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 h15si12365241ila.123.2021.04.04.22.24.49; Sun, 04 Apr 2021 22:25: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=RHoI+pUc; 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 S232124AbhDEFY0 (ORCPT + 99 others); Mon, 5 Apr 2021 01:24:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:56772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232098AbhDEFYZ (ORCPT ); Mon, 5 Apr 2021 01:24:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 892346139E; Mon, 5 Apr 2021 05:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617600259; bh=nRfDFwKnXvGxEINJ1gcUC5CV0hDDdn2QGMGYyGbA7kU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RHoI+pUcHzU20igTKYZrklmw7W/BSsCop538orqhMBlWsUMJ25vZUuom6KI8GJ6xJ HaROOmDmBRB/yGlqL4AtjyV/K9d0f4v9hRClzfsYeretoARDsMPdSctmtreSR/Ht6H WsuQfYs5lXbXpYinCPOm6HuwsFhisYx9BDQrlcETN+mrI4GhkEA6+wOgjRdIQp5X8s MkOBzOg7YwifLq7AcIG4RMeq9ySjzFiBaMHNvR5zm5Xwhn6DtVXYST+6bXKykJbjXZ kH30bar0LGJwgxKwOoqtsOY+jzXkUPejDXliyyPKH5uOYsOsInJ5kpgXj2s9xBpBbs +swSb/FSAvQ+A== 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 03/10] RDMA/iser: Enable Relaxed Ordering Date: Mon, 5 Apr 2021 08:23:57 +0300 Message-Id: <20210405052404.213889-4-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 iser. 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/iser/iser_memory.c | 10 ++++------ drivers/infiniband/ulp/iser/iser_verbs.c | 6 ++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index afec40da9b58..29849c9e82e8 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -271,9 +271,8 @@ iser_reg_sig_mr(struct iscsi_iser_task *iser_task, wr->wr.send_flags = 0; wr->mr = mr; wr->key = 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; rsc->mr_valid = 1; sig_reg->sge.lkey = mr->lkey; @@ -318,9 +317,8 @@ static int iser_fast_reg_mr(struct iscsi_iser_task *iser_task, wr->wr.num_sge = 0; wr->mr = mr; wr->key = mr->rkey; - wr->access = IB_ACCESS_LOCAL_WRITE | - IB_ACCESS_REMOTE_WRITE | - IB_ACCESS_REMOTE_READ; + wr->access = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE | + IB_ACCESS_REMOTE_READ | IB_ACCESS_RELAXED_ORDERING; rsc->mr_valid = 1; diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 3c370ee25f2f..1e236b1cf29b 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c @@ -121,7 +121,8 @@ iser_create_fastreg_desc(struct iser_device *device, else mr_type = IB_MR_TYPE_MEM_REG; - desc->rsc.mr = ib_alloc_mr(pd, mr_type, size, 0); + desc->rsc.mr = ib_alloc_mr(pd, mr_type, size, + IB_ACCESS_RELAXED_ORDERING); if (IS_ERR(desc->rsc.mr)) { ret = PTR_ERR(desc->rsc.mr); iser_err("Failed to allocate ib_fast_reg_mr err=%d\n", ret); @@ -129,7 +130,8 @@ iser_create_fastreg_desc(struct iser_device *device, } if (pi_enable) { - desc->rsc.sig_mr = ib_alloc_mr_integrity(pd, size, size, 0); + desc->rsc.sig_mr = ib_alloc_mr_integrity(pd, size, size, + IB_ACCESS_RELAXED_ORDERING); if (IS_ERR(desc->rsc.sig_mr)) { ret = PTR_ERR(desc->rsc.sig_mr); iser_err("Failed to allocate sig_mr err=%d\n", ret); -- 2.30.2