Re: [PATCH v4 14/18] PCI/P2PDMA: Extract pure ACS routing decision helpers

From: Logan Gunthorpe

Date: Tue Aug 25 2026 - 16:02:08 EST




On 2026-08-21 13:38, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
>
> The ACS routing decision and Egress Control Vector size calculation are
> mixed with config-space I/O, which makes their branch-heavy behavior
> difficult to exercise independently.
>
> Extract pci_acs_p2pdma_decision() with explicit Request or Completion type,
> target availability, and vector state inputs. Extract
> pci_acs_egress_port_valid() for the encoded vector-size boundary. Keep
> config access in their callers and expose only the pure helpers under
> CONFIG_KUNIT.
>
> Tested-by: Tushar Dave <tdave@xxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>

Makes sense:

Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>