From patchwork Mon Mar 4 13:52:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Taranov X-Patchwork-Id: 13580646 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 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 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-rdma@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