From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2F15366; Sun, 27 Apr 2025 07:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745740419; cv=none; b=elYloxKKYcJTFLHSV2dhHFmM81zgBck3trN45/AftiF4lU3uZY0oqBBgRiixf8/v4vkWxgdzjIAJzDTvfIFxgkFpVOcAnoWq9Bok+kvTOsXLVhgKHRk+wx3FuMFIla4QgdiBVSL43tU5XqdRSt9xUmZ3bKFdlpOT7iXpmxP7QSo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745740419; c=relaxed/simple; bh=iKyTQwydNmAM/0HcUlde1DtC+bZbAuPZo0BeWV99Sn0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sQy/zUSDFekwZcMyPogIZATaX87cJP1y0nFyl7mRGyrL28dhfs7E7ij1vsLZprnlRzmSh+Qhh0Y559CCwNyuAmzpU1qaUyPg+48fzdkzSmaVlNVhguBVk/O9NqxnGF2BD1dxqwup0NF4kHIssTXEQ2lfj/6xma9Bt+5XFpsP0w8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OmokyrrK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OmokyrrK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9CD1C4CEE3; Sun, 27 Apr 2025 07:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745740418; bh=iKyTQwydNmAM/0HcUlde1DtC+bZbAuPZo0BeWV99Sn0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OmokyrrKogcvAy75PZnoqbf/SV/3tN6a/jr9gHE56cV2aAUja1b1vR87w7sFYp9SM 2MTW/5zl9jZEDztFGGMRMoytnKxQ/fH3Nx6Llyyms85hrYsAaXPnI47FYKgA+tncyk mkQJNR/IXAW+albRz+ErujsbIoPBM+w7flk409Lh3ddIk6MNaLOs5tByMzgIIbhf5K jRQYMV0yr7lWDCaipx7Aq5g43zt2+567TjgKvYuKc8lxRSBlEQo2Qk0Kj38yk4NdCj I1x37331Ys/wwpuT1EUyEcmT/tN7FXyY29DcKZ5RlQ/ztukgb7skj9uPZ3RY+pbnTx CTtopc3JapJnQ== Date: Sun, 27 Apr 2025 10:53:32 +0300 From: Leon Romanovsky To: Luis Chamberlain Cc: Marek Szyprowski , Jens Axboe , Christoph Hellwig , Keith Busch , Jake Edge , Jonathan Corbet , Jason Gunthorpe , Zhu Yanjun , Robin Murphy , Joerg Roedel , Will Deacon , Sagi Grimberg , Bjorn Helgaas , Logan Gunthorpe , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, Niklas Schnelle , Chuck Lever , Matthew Wilcox , Dan Williams , Kanchan Joshi , Chaitanya Kulkarni Subject: Re: [PATCH v9 02/24] dma-mapping: move the PCI P2PDMA mapping helpers to pci-p2pdma.h Message-ID: <20250427075332.GC5848@unreal> References: <493a6ab31fdd73e84e16662578858f194e9f87b9.1745394536.git.leon@kernel.org> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Apr 25, 2025 at 05:34:14PM -0700, Luis Chamberlain wrote: > On Wed, Apr 23, 2025 at 11:12:53AM +0300, Leon Romanovsky wrote: > > From: Christoph Hellwig > > +enum pci_p2pdma_map_type { > > + /* > > + * PCI_P2PDMA_MAP_UNKNOWN: Used internally for indicating the mapping > > + * type hasn't been calculated yet. Functions that return this enum > > + * never return this value. > > + */ > > This last sentence is confusing. How about: > > * PCI_P2PDMA_MAP_UNKNOWN: Used internally as an initial state before > * the mapping type has been calculated. Exported routines for the API > * will never return this value. This patch moved code as is, but sure, let's update the comments. > > > + PCI_P2PDMA_MAP_UNKNOWN = 0, > > + > > + /* > > + * Not a PCI P2PDMA transfer. > > + */ > > + PCI_P2PDMA_MAP_NONE, > > + > > + /* > > + * PCI_P2PDMA_MAP_NOT_SUPPORTED: Indicates the transaction will > > + * traverse the host bridge and the host bridge is not in the > > + * allowlist. DMA Mapping routines should return an error when > > + * this is returned. > > + */ > > + PCI_P2PDMA_MAP_NOT_SUPPORTED, > > + > > + /* > > + * PCI_P2PDMA_BUS_ADDR: Indicates that two devices can talk to > > You mean PCI_P2PDMA_MAP_BUS_ADDR done > > > + * pci_p2pdma_bus_addr_map - map a PCI_P2PDMA_MAP_BUS_ADDR P2P transfer > > Hrm, maybe with a bit more clarity: > > Translate a physical address to a bus address for a PCI_P2PDMA_MAP_BUS_ADDR > transfer. > > > Other than that. > > Reviewed-by: Luis Chamberlain Thanks > > Luis >