Re: [PATCH v6 07/18] PCI/P2PDMA: Collect the path's ACS controls before deciding
From: Logan Gunthorpe
Date: Fri Sep 18 2026 - 17:12:29 EST
On 2026-09-14 05:22, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
>
> calc_map_type_and_dist() reads each divergence port's ACS Control register
> and folds the result into running counters as it goes. Any routing property
> that depends on the kind of TLP being routed would have to be threaded
> through that code, so there is nowhere to put one without reading the
> registers again for each kind.
>
> Collect the two ports' ACS Control values into struct pci_p2pdma_acs_path
> first, then decide from it. pci_p2pdma_route() applies the same rule as
> before: a path routes directly only when both directions do.
>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
Big patch, but I think it makes sense. Might have been easier to read if
splitting out pci_p2pdma_warn_path() was done first in a prep patch. But
this is already a pretty large and growing series.
Overall though, I think the patch is ok:
Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>