Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1847134lqg; Mon, 4 Mar 2024 05:53:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVl+B679XoaAkszpiWiYNO2ibEgv4XplFEEh0qgFergBDx0mmR7O8TnEbgRMscIV0ekgJT7Qxrai+DwA8bjud/rDbZ7SVgQnxRRPqtyNg== X-Google-Smtp-Source: AGHT+IGwpjfwsrjHmpAU43P44b04ecdy3RLtqtedfsgcbjFHJVHUvKmttoAFXPSlUWp3eSXy9lXm X-Received: by 2002:a81:6f06:0:b0:608:5af9:b486 with SMTP id k6-20020a816f06000000b006085af9b486mr8094392ywc.11.1709560404450; Mon, 04 Mar 2024 05:53:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709560404; cv=pass; d=google.com; s=arc-20160816; b=Q9hjFRSPR6sCQTxx5mfPTVI3CH+vPYWjDbtl9c+UvRnmaiZMToIQglpE9liFOOXq0n v+KstB4nSlVaSChno41fvZ9/Ae8coJotQNdTiftWLKOT5GFZe4I7/MIBi0OdvTcCrg9S q6+gCy0Jpm3S9yd6lhM+57pBh7eF71Kuq2zL0enNi/FfdQr/J7xZ74w0l0QTyLWHXdvA osRT+PBavH/E9zbrPVBRPCS7gy2hyYWRbfanGBNduB/1Zmk5gvKtscD1aovWZuJPq4sK bnw0kGmbzt5JbthEH8G0kyamgJ84tsfP8U56cbnio+7BDjhupSFHwz9UijJpv1ccI3o9 p3ZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=PwpulH08AbMmhYDOwT7qW2eiML06lbhG8MMra/FdQ18=; fh=ujksmUrBEjpGhQjWbrjZMx9PDXUXbYR/j4y8MAq1x1o=; b=GLxERAduqfHqPFlq/jl4APhXfG42OE5+JxhPfe/Y5lx3pNM6f5hWy0XdazEeFe5uCC bqH2vJH3EDF66hDTrH3E6oGElhBlSJembbYllYaiL0fDcm8U/PkOb3EvVG5KvVrhV+vu ic7iP11xb6+dSFBZ1qkXVsy1QvnMlZR0oy+4o+vED6txB9I10KpYEcCMi8/5zEdcN+6f SDEExr/k8fvJSzW3Gi7z1nGK0LhNjlO17KCUGb6zm+0XykaU1NUySPq809yQ1i5DdUBM ZzmHi9TGgZj1eB+JT7QZUlNOKWPMM8LqIVFLQ/sng5Qa3/LSepXb04WUpqmlZATtpX0A 1JyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jPMT5EX0; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-90684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90684-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d16-20020a05622a15d000b0042ee9f53ab0si3458024qty.460.2024.03.04.05.53.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 05:53:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jPMT5EX0; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-90684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90684-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2EED41C20B5C for ; Mon, 4 Mar 2024 13:53:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C46603FB0A; Mon, 4 Mar 2024 13:52:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="jPMT5EX0" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D12F3DB9A; Mon, 4 Mar 2024 13:52:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560376; cv=none; b=Gv2bqYIuPZMn9t96Kk+Q/CY8hnHv7u2O48LIbroil1OHgt7ntz8kE2MaWR7woJCbuaoFE67B04rDZ50llfNCgjSgc8JLG/UOK3z1Sz+cEvXjuAVdoQAgktVhMfanppo6LcgHqjdXvlYhnEX4YQz/Y8cs39HE9UMDCYnBXLJGQy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709560376; c=relaxed/simple; bh=VgKcy/wt8otFtLEAxcf4FH/B26139TXWisSm6/+JazE=; h=From:To:Cc:Subject:Date:Message-Id; b=VaN3olmLOQWcOwFn84yD0Stdp6NpRQzW4qEn8TxJ/mkRTnqcLu/vnw5kAQYhbMzOuVYcm4snz/xubMgJwXBwf4ta0Djn1vRNEAq+6iwTRpnEFmd5yqiJuf/cfc1ZdxSDJFr3atix1+2i86yjg6kshn8FiAex8ykfyS9tYIaKzuY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=jPMT5EX0; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 1797020B74C0; Mon, 4 Mar 2024 05:52:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1797020B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709560367; bh=PwpulH08AbMmhYDOwT7qW2eiML06lbhG8MMra/FdQ18=; h=From:To:Cc:Subject:Date:From; b=jPMT5EX0OAD69cpEVDfCC+1P+D2qcCpPIEVIiELZLGub/shudqSU96en2OZSzyMJ+ HKJTlEn1pdwUlIIxD+VZ4wn8bgxYQ5jIAKuO81HIuDCyaUc5D9x5l/OH/n2WJqlLTk JTDHfNd87b6A9YISrYlptLiY+8zYcLdpseIGqyHo= From: Konstantin Taranov To: kotaranov@microsoft.com, sharmaajay@microsoft.com, longli@microsoft.com, jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH rdma-next v3 0/2] RDMA/mana_ib: Improve dma region creation Date: Mon, 4 Mar 2024 05:52:39 -0800 Message-Id: <1709560361-26393-1-git-send-email-kotaranov@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Konstantin Taranov This patch series fixes an incorrect offset calculation for dma regions and adds new functions to create dma regions: 1) with iova 2) without iova but with zero dma offset Changes: v1->v2: Split the patch into 2 commits In 1/2, Improved commit messages and added "Fixes:" In 2/2, Used correct helpers to get page size for iova and no-iova cases In 2/2, Introduced mana helpers to work with iova and no-iova cases v2->v3: In 2/2, Return -EINVAL on failed ib_umem_find_best_pgoff In 2/2, Improved commit message and added "Fixes:" Konstantin Taranov (2): RDMA/mana_ib: Fix bug in creation of dma regions RDMA/mana_ib: Use virtual address in dma regions for MRs drivers/infiniband/hw/mana/cq.c | 4 +-- drivers/infiniband/hw/mana/main.c | 42 +++++++++++++++++++++------- drivers/infiniband/hw/mana/mana_ib.h | 7 +++-- drivers/infiniband/hw/mana/mr.c | 4 +-- drivers/infiniband/hw/mana/qp.c | 6 ++-- drivers/infiniband/hw/mana/wq.c | 4 +-- 6 files changed, 46 insertions(+), 21 deletions(-) base-commit: 14b526f55ba5916856126f9793309fd6de5c5e7e -- 2.43.0