Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2967522pxf; Sun, 4 Apr 2021 22:26:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy64T6XtWcv/1fQ6OHQrd1mCKT5xo3h1iB5RDsGjfNtGoQ0vMh5ETh4Mv7JWlrkSXhV/XY0 X-Received: by 2002:a92:8e4f:: with SMTP id k15mr4159435ilh.16.1617600366288; Sun, 04 Apr 2021 22:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617600366; cv=none; d=google.com; s=arc-20160816; b=l5tdHwrRr2aMy1olNQ3oaKAFrQ+fugluRMiWiY15CBQTNcCXli0lCel3lxXUIqRWJp bzpb8uHdRIY/CdDg4+9y65vVKD6KhzMKx8fiaZf5MlGGh04yS1MoGwMJGqPXsp/sIDX3 FpK0FvPwL3KzMrNHf63HJxrXBcVaFwvQ2LUerEQQ/rRqACUkrsRYzWx30+gLThWpgUfv trEn2aZ3w11xlOHIIGN7G4Svm4kHDlind6KwST+jsUY1m45o72gf9rBSq/e+T7lsq7ui Z4+ljeVpuTZAu5jt3HsRfJcp03Lsui5Mh+XytUlUDRSdFv0OxzcJe1xCPpXpidmZTlK+ A6DA== 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=FhbwKzR2uzzL5ly2oDXXBlUsbMiTHaNio9BPAnaVCog=; b=m1+bHC2ckPS7V/dRTT8D7GJWPB3FjZ9WPghusU5G+IIjioXXY5hZyJr6f4ePE0GUr9 qFR3hJ13F+PBODMai3fqi8M4zeHv9IfwmOL+cdGZ5Z73p8bsRop9bYeYBDo4IXmia+ks wVhyOHQRBzqifKugXgG8Vz8/y4hA5BAntYzFQkj7vC2Ia3W04MMHBXcKqSHagFVtSxjt z/P/Hc+RxG4npEQPd3Z1JoxDhyYOf2jbXmBD9kPyqiTCHKgU/fGbaExZQBFxa2wla4c7 PyY5XaPY81kxPyW8k1gCL+wBZm4FbXW0zv7KopGdIjLJ/WvQrSqDEEvyFyG7kQ7G2GYv CFsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fWplzcsL; 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 c5si14471334jam.17.2021.04.04.22.25.53; Sun, 04 Apr 2021 22:26:06 -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=fWplzcsL; 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 S232354AbhDEFY5 (ORCPT + 99 others); Mon, 5 Apr 2021 01:24:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:57994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232302AbhDEFYx (ORCPT ); Mon, 5 Apr 2021 01:24:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 27751613A0; Mon, 5 Apr 2021 05:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617600286; bh=qC4efJ6nsgEYXrpmkxKWy75LAL147M2IGYN5TPsAdII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fWplzcsL9Z5M80eaItlaxJPIR8oDNUKVel7eVHXrIxgYhy15rmgiaRan2ANUF/xfS apgjMlinRcwdZm0uRUeyF/w4IyRoC8LiJdvurqBkHVTLLZHkorC1ppo+CRAOPQhuco hko2LOHnT6P1Cu75LPSLN6AjVOzu0jA/c2M6h8tw4toBn+o4y/+WJoCy91HO2D7mvd NAzKe3/TxiRAXu7DgOhWFA9vuqbpH3rhesPmiSiqOcI7iH/mrdhmzUMyzAgWVBGM3/ VuCoVYPSlpRIc2bqYFPLZamRFc55xmRnknWVB8LUXs8Muk5YNrVOlYzmxGXd+Mjwyu zd12jPeU6mFnw== 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 09/10] net/smc: Enable Relaxed Ordering Date: Mon, 5 Apr 2021 08:24:03 +0300 Message-Id: <20210405052404.213889-10-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 smc. 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/smc/smc_ib.c | 3 ++- net/smc/smc_wr.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/net/smc/smc_ib.c b/net/smc/smc_ib.c index 4e91ed3dc265..6b65c5d1f957 100644 --- a/net/smc/smc_ib.c +++ b/net/smc/smc_ib.c @@ -579,7 +579,8 @@ int smc_ib_get_memory_region(struct ib_pd *pd, int access_flags, return 0; /* already done */ buf_slot->mr_rx[link_idx] = - ib_alloc_mr(pd, IB_MR_TYPE_MEM_REG, 1 << buf_slot->order, 0); + ib_alloc_mr(pd, IB_MR_TYPE_MEM_REG, 1 << buf_slot->order, + IB_ACCESS_RELAXED_ORDERING); if (IS_ERR(buf_slot->mr_rx[link_idx])) { int rc; diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c index cbc73a7e4d59..78e9650621f1 100644 --- a/net/smc/smc_wr.c +++ b/net/smc/smc_wr.c @@ -555,7 +555,8 @@ static void smc_wr_init_sge(struct smc_link *lnk) lnk->wr_reg.wr.num_sge = 0; lnk->wr_reg.wr.send_flags = IB_SEND_SIGNALED; lnk->wr_reg.wr.opcode = IB_WR_REG_MR; - lnk->wr_reg.access = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE; + lnk->wr_reg.access = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE | + IB_ACCESS_RELAXED_ORDERING; } void smc_wr_free_link(struct smc_link *lnk) -- 2.30.2