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 <hch@xxxxxx> > > +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 <mcgrof@xxxxxxxxxx> Thanks > > Luis >