Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2397522pxb; Fri, 29 Oct 2021 00:04:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU+yLa0b9gmwpuZDqF6iZ7c5jTuqAMHD3L/Nc8qfepO3AsEEmJElZgKgpuBssueoFF1Gf+ X-Received: by 2002:a17:90b:3901:: with SMTP id ob1mr7065914pjb.219.1635491071518; Fri, 29 Oct 2021 00:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635491071; cv=none; d=google.com; s=arc-20160816; b=fdCn5FkT38Ai0MmgQgf/r1P/v39mmyVwYVhhMpzykruus9ONukDIP/g0mRfnyIyfIs GUWdkBigoCvR/dOY2enHARoD8ZGDregh/nxKPcnTasjnrcwVabf1298eLfsIxgyvzLmE XEHxtMbVZbvqg2g73kNVIgGCGnnQSud7zk4PIXp54tCPtcMLA8/2z+LE1K/gcMGdrnf1 bNZ38S9VNUG8FtZvQzHFC2U7bEm6GFJMjz3CVLXWHxSk5kn1MIpDEDiGkD3x5ynkvxIL GPrLw4W8T21Jp+FKVmGOo4KrTxOm8xK7YP/wgl5yHgXLh2JYd6u87t2NCWI1/m9qMEJv dTQA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=OBWdZ+D4rVuAM/YVY5PfNR/VqcL1cfHe5Q0y/P8//ew=; b=aHs3J0is2PCSJa9cW+FIbikzDHl4u1bLGn+AleAM1FBkwFsF27mfx6fgC2awJbl0KE +RUofuMoI5upC+sRIAMJrha9Ce482EGrNdVuwuddQ/paZP6U6L0vgEEPlUVpPJDDQ0Rs hWQ3x1ZZNRh+ptm3+xuBOqd8MhDftcBEgpbgSS1hE1YKAKVnuUoIQJF9g0AxFfPvgAW5 cvYX8S/1ixKUT1mW/snav5JLvBVaDkgI0aPsUiepw0XkxIGzfcr7I/z5hexbksreeqFI GJuNxFfkfARzH8S3Yr6ALbjo8ZpQU1BA9PsU9fSSamBQdVMLIaeQqO3JVgOddYIAmenv 2IBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b=BF1UHSWl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 71si7001637pge.108.2021.10.29.00.04.17; Fri, 29 Oct 2021 00:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b=BF1UHSWl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232118AbhJ2HFj (ORCPT + 99 others); Fri, 29 Oct 2021 03:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232123AbhJ2HFi (ORCPT ); Fri, 29 Oct 2021 03:05:38 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12923C061745 for ; Fri, 29 Oct 2021 00:03:10 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id i5so6228811pla.5 for ; Fri, 29 Oct 2021 00:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OBWdZ+D4rVuAM/YVY5PfNR/VqcL1cfHe5Q0y/P8//ew=; b=BF1UHSWlvI3/HOU1nzG+lh7R6COCYCDihZSUpBn1Y7hcTEs69SKIUwMVP1+q47NcFn OAodoerM0PM+trbldYixN+Ax09PYB1najZ8draC0zQ0l2jlPvZd8TaDXkos1UIfyMwQx GQnc4pH0EBcYsQ7lKoxoTHesH7PyX4mF70rTyAmvITU0+ERjCerc9G+FQ14RkwdNrzAy 5PFwi3uvH1uPUWpFZMZ5ifO9T98nQMlbthS7WAaP5y6TDEFOiWzJsIc3X49WXZfFM5hX DPwDUOxaRqYlmvrCLCfiAePjH1/niVk/RfIXNbW+zbpD2rBV3xXjzzX/q0D3fgKkh81O XaDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OBWdZ+D4rVuAM/YVY5PfNR/VqcL1cfHe5Q0y/P8//ew=; b=nxcNLRrXc13WRobydKeisG/aQP3bnvoJ9FfVQnWZNJIhawtxLNqU2Sn5rGkMZBALF3 bhzsp2qZ4Mtq3Ol4yZreS65kBznp3RyWdtaL6qSPZ3O7ViJYvwUc3IpyIfqVrGjV5nuK Lv3WDDkIX1ncnng2aaTQESV5YwnYLpy7//62LQoTV8hOHIXPrwwPrhTB+eTD7mk/m6II hRf/sAGw2vDMl/3uG8cU3yMfS9zK2aHRYKNB93G+G9N1HHduHfMJVEa6JSaG0AYiqSv3 jGnB75HAZlCt10eFxcNvO/EKplDiNPGp5nyKRIxMdaptpz86TK1serEQ43lfJ0qFGsKf bmjQ== X-Gm-Message-State: AOAM530K0CnkQIexsnqeuQOiCvE6sYbsplMGlSeMVJ/ql5ju9+h0Pp/Q fu2bCzrHn1BTRS4st7cbS41WEw8PEUSL94V5Wp8= X-Received: by 2002:a17:90b:388a:: with SMTP id mu10mr17448632pjb.221.1635490989501; Fri, 29 Oct 2021 00:03:09 -0700 (PDT) Received: from tyrell.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id p16sm6039787pfh.97.2021.10.29.00.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 00:03:08 -0700 (PDT) From: Shunsuke Mie To: Zhu Yanjun Cc: Shunsuke Mie , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Daniel Vetter , Doug Ledford , Jason Gunthorpe , Jianxin Xiong , Leon Romanovsky , Maor Gottlieb , Sean Hefty , Sumit Semwal , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, dhobsong@igel.co.jp, taki@igel.co.jp, etom@igel.co.jp Subject: [RFC PATCH v3 0/2] RDMA/rxe: Add dma-buf support Date: Fri, 29 Oct 2021 16:02:56 +0900 Message-Id: <20211029070258.59299-1-mie@igel.co.jp> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series add a dma-buf support for rxe driver. A dma-buf based memory registering has beed introduced to use the memory region that lack of associated page structures (e.g. device memory and CMA managed memory) [1]. However, to use the dma-buf based memory, each rdma device drivers require add some implementation. The rxe driver has not support yet. [1] https://www.spinics.net/lists/linux-rdma/msg98592.html To enable to use the dma-buf memory in rxe rdma device, add some changes and implementation in this patch series. This series consists of two patches. The first patch changes the IB core to support for rdma drivers that has not dma device. The secound patch adds the dma-buf support to rxe driver. Related user space RDMA library changes are provided as a separate patch. v3: * Rebase to the latest linux-rdma 'for-next' branch (5.15.0-rc6+) * Fix to use dma-buf-map helpers v2: https://www.spinics.net/lists/linux-rdma/msg105928.html * Rebase to the latest linux-rdma 'for-next' branch (5.15.0-rc1+) * Instead of using a dummy dma_device to attach dma-buf, just store dma-buf to use software RDMA driver * Use dma-buf vmap() interface * Check to pass tests of rdma-core v1: https://www.spinics.net/lists/linux-rdma/msg105376.html * The initial patch set * Use ib_device as dma_device. * Use dma-buf dynamic attach interface * Add dma-buf support to rxe device Shunsuke Mie (2): RDMA/umem: Change for rdma devices has not dma device RDMA/rxe: Add dma-buf support drivers/infiniband/core/umem_dmabuf.c | 20 ++++- drivers/infiniband/sw/rxe/rxe_loc.h | 2 + drivers/infiniband/sw/rxe/rxe_mr.c | 113 ++++++++++++++++++++++++++ drivers/infiniband/sw/rxe/rxe_verbs.c | 34 ++++++++ include/rdma/ib_umem.h | 1 + 5 files changed, 166 insertions(+), 4 deletions(-) -- 2.17.1