Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1680995rwb; Thu, 10 Nov 2022 21:31:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf407M9zR1ZXnQcHcaDBLBx8YSvkwTH5bNMhVWG6KueZ7dd0DhFKlIYL2zst4jBXPeyGvr7S X-Received: by 2002:a17:902:7e48:b0:187:feb:a787 with SMTP id a8-20020a1709027e4800b001870feba787mr776290pln.39.1668144668097; Thu, 10 Nov 2022 21:31:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668144668; cv=none; d=google.com; s=arc-20160816; b=wnez7KABjK9wb6Ax5mKwDqfM73gbKPPq5MaarlSHLJY/7Ugf5ecH9825txAwQ4rRIX ugpBuw+/VInOi6jv2JY/XhqzEtaX+DnLT5EdpKFnxKgNXNHfWeLC7J1gKPrsVyP6bWVV jLe+gwRW4pFxckWJ1jMzK8ywxyewSXQ5RjFVFQGnVxb0FTWxpILgv01LzpqubGJZntZb HkaTouFgukdakwKqiDVGL7pugYwsqyEjDwJkQ0FEiLniMgEUe36gN2fTxupVanZgfkcW 261NYrGIlfVld4+yk5EQ3VTYJOKOdgiS7Xv2GCsWwhIDdV1SFFqXgcZ2sV37YKK0rn05 WT6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=qfFZQbTvGV8YnMkJ2TiYg0iJaPMZtX/qYQUzFkFbqog=; b=JWvgxVbNqSitccVGUAQOpFkbDF+tkNY0jDxRYmChC8LpqIwJccLCh6LZlurGnd9lpz EHGg0mznIZ76rKQoUHqIj0r8Glv1qUyvST8ZbaHseyM2MR4SAqu4jRc9+SBsrPyVELLy 9vmw0W2JlnFSsFFEve8BHQGCyhbhvSHs2Ql81UZWRXDj2V6WNPVaZNtoLx0Rk0CdHuuF mz9BjoHoVqzqgAG5astDoUNF3ec7t6QeTa3nss1dFDAhJ2VnKabpZ2QpLpHXQ0JFRQxb IG3foYb82HgqVLybq258bnCOG4tj0dtbTBgUVqqtxwYKYZTjZV+ikCgWwerEDRukMlYF d9qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fujitsu.com header.s=170520fj header.b=koQX9oOH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g69-20020a636b48000000b0042af7555d10si1079840pgc.862.2022.11.10.21.30.54; Thu, 10 Nov 2022 21:31:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fujitsu.com header.s=170520fj header.b=koQX9oOH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbiKKEax (ORCPT + 92 others); Thu, 10 Nov 2022 23:30:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiKKEau (ORCPT ); Thu, 10 Nov 2022 23:30:50 -0500 Received: from mail1.bemta37.messagelabs.com (mail1.bemta37.messagelabs.com [85.158.142.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71C7A42F68; Thu, 10 Nov 2022 20:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.com; s=170520fj; t=1668141047; i=@fujitsu.com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hHnjQKb wZOaVwE1/BbSYCWixXWoWyOKSRISUVAOTZpb84sP2u1b8XNH9NXiX0kNXVr/tJ1qKIvW25ufm i65/ItKv7mLixDYhImxfYVxi4PM+I53jCXoxM2UnzN745OCCRQWOR9f0Jp57IV+WnWUvxm0Ys EqrQvek47Yzr/R3/9G5c84gUiNx2d5S+T3LJq6z1eAsqmObpNa7XXnaz9Tapc5zeCvMO9jUrr 1xXr3b6v6Fa1GRUldaN2SF+jdLTrWwl7y44dLJz91/viVe/Bbsf7FTLjJauqX+0LLOqRp5l6/ uvq5zzT3v9J5p3evWPm/8PqFKp/+jiZbzOb61XjkdOVOuHjXZduWXof+uWZknt/jsWdCkcGW5 6ylHc6nrP4qLHDZInzuwf6eGnqG8EktxRqKhFnNRcSIAKDsId2QDAAA= X-Env-Sender: lizhijian@fujitsu.com X-Msg-Ref: server-6.tower-732.messagelabs.com!1668141046!636325!1 X-Originating-IP: [62.60.8.179] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.100.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29744 invoked from network); 11 Nov 2022 04:30:47 -0000 Received: from unknown (HELO n03ukasimr04.n03.fujitsu.local) (62.60.8.179) by server-6.tower-732.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 11 Nov 2022 04:30:47 -0000 Received: from n03ukasimr04.n03.fujitsu.local (localhost [127.0.0.1]) by n03ukasimr04.n03.fujitsu.local (Postfix) with ESMTP id 80115155; Fri, 11 Nov 2022 04:30:46 +0000 (GMT) Received: from R01UKEXCASM126.r01.fujitsu.local (R01UKEXCASM126 [10.183.43.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by n03ukasimr04.n03.fujitsu.local (Postfix) with ESMTPS id 737F7154; Fri, 11 Nov 2022 04:30:46 +0000 (GMT) Received: from bc0da1a9c27e.localdomain (10.167.225.141) by R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 11 Nov 2022 04:30:43 +0000 From: Li Zhijian To: Zhu Yanjun , Jason Gunthorpe , "Leon Romanovsky" , CC: , Li Zhijian Subject: [for-next PATCH 0/5] iova_to_vaddr refactor Date: Fri, 11 Nov 2022 04:30:25 +0000 Message-ID: <1668141030-2-1-git-send-email-lizhijian@fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.225.141] X-ClientProxiedBy: G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) To R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Background: iova_to_addr just lookups at the map which is constructed and manages the relationship between iova to vaddr when MR is registering. By conventional, we should map the userspace address(iova) every time we want to access it. Please refer to the previous discussion[1][2] for more details. Refactor: In this refactoring, we will do the map every time before the user really accesses it. patch1,3,5 are cleanup and preparation. patch2 is to make all subroutines accessing the iova use iova_to_vaddr() API. patch4 is the refactor. [1]: https://www.spinics.net/lists/linux-rdma/msg113206.html [2]: https://lore.kernel.org/all/20220118123505.GF84788@nvidia.com/ Li Zhijian (5): RDMA/rxe: Remove rxe_phys_buf.size RDMA/rxe: use iova_to_vaddr to transform iova for rxe_mr_copy RDMA/rxe: iova_to_vaddr cleanup RDMA/rxe: refactor iova_to_vaddr RDMA/rxe: Rename iova_to_vaddr to rxe_map_iova drivers/infiniband/sw/rxe/rxe_loc.h | 3 +- drivers/infiniband/sw/rxe/rxe_mr.c | 128 +++++++++++--------------- drivers/infiniband/sw/rxe/rxe_resp.c | 5 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 1 - drivers/infiniband/sw/rxe/rxe_verbs.h | 6 +- 5 files changed, 62 insertions(+), 81 deletions(-) -- 2.31.1