Re: [PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported result upstream_bridge_distance()

From: Christoph Hellwig
Date: Wed Aug 07 2019 - 01:55:12 EST


On Tue, Jul 30, 2019 at 10:35:34AM -0600, Logan Gunthorpe wrote:
> Add constant flags to indicate two devices are not supported or whether
> the data path goes through the host bridge instead of using the negative
> values -1 and -2.
>
> This helps annotate the code better, but the main reason is so we
> can use the information to store the required mapping method in an
> xarray.
>
> Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
> Reviewed-by: Christian König <christian.koenig@xxxxxxx>

Is there really no way to keep the distance separate from the type of
the connection as I requested? I think that would avoid a lot of
confusion down the road.