From patchwork Thu Jul 2 15:16:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 6711101 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9259E9F1C1 for ; Thu, 2 Jul 2015 15:16:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD6F720622 for ; Thu, 2 Jul 2015 15:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C25AB20621 for ; Thu, 2 Jul 2015 15:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753557AbbGBPQ0 (ORCPT ); Thu, 2 Jul 2015 11:16:26 -0400 Received: from smtp.opengridcomputing.com ([72.48.136.20]:48711 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753159AbbGBPQZ (ORCPT ); Thu, 2 Jul 2015 11:16:25 -0400 Received: from build.ogc.int (build.ogc.int [10.10.0.2]) by smtp.opengridcomputing.com (Postfix) with ESMTP id DC19E29E5F; Thu, 2 Jul 2015 10:16:24 -0500 (CDT) Subject: [PATCH V4 4/5] RDMA/isert: Set REMOTE_WRITE on DMA MRs to support iWARP devices From: Steve Wise To: dledford@redhat.com Cc: roid@mellanox.com, linux-rdma@vger.kernel.org, sagig@mellanox.com, infinipath@intel.com, target-devel@vger.kernel.org, eli@mellanox.com, ogerlitz@mellanox.com Date: Thu, 02 Jul 2015 10:16:24 -0500 Message-ID: <20150702151624.12946.45034.stgit@build.ogc.int> In-Reply-To: <20150702151508.12946.29133.stgit@build.ogc.int> References: <20150702151508.12946.29133.stgit@build.ogc.int> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP iWARP devices require REMOTE_WRITE for MRs used as the destination of an RDMA READ. IB does not require this. Since isert never advertises the rkey of its DMA MRs to the peer, just add REMOTE_WRITE to the access flags when allocating DMA MRs for all devices. Signed-off-by: Steve Wise Reviewed-by: Sagi Grimberg --- drivers/infiniband/ulp/isert/ib_isert.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 9e7b492..2737ade 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -383,7 +383,8 @@ isert_create_device_ib_res(struct isert_device *device) goto out_cq; } - device->mr = ib_get_dma_mr(device->pd, IB_ACCESS_LOCAL_WRITE); + device->mr = ib_get_dma_mr(device->pd, IB_ACCESS_LOCAL_WRITE | + IB_ACCESS_REMOTE_WRITE); if (IS_ERR(device->mr)) { ret = PTR_ERR(device->mr); isert_err("failed to create dma mr, device %p, ret=%d\n",