Re: [PATCH v4 11/18] PCI/P2PDMA: Derive peer-to-peer routing from ACS control bits

From: Logan Gunthorpe

Date: Tue Aug 25 2026 - 15:17:49 EST




On 2026-08-21 13:38, Leon Romanovsky wrote:
> @@ -767,7 +782,9 @@ calc_map_type_and_dist(struct pci_dev *provider, struct pci_dev *client,
> while (a) {
> dist_b = 0;
>
> - if (pci_bridge_has_acs_redir(a)) {
> + if (pci_acs_p2pdma_state(a,
> + PCI_ACS_P2PDMA_TLP_COMPLETION) ==
> + PCI_ACS_P2PDMA_REDIRECT) {
> seq_buf_print_bus_devfn(&acs_list, a);
> acs_cnt++;
> }

One nit: the line breaking here is a bit nasty and hard to read. Maybe
it would be better to use a variable?

state = pci_acs_p2pdma_state(a, PCI_ACS_P2PDMA_TLP_COMPLETION);
if (state == PCI_ACS_P2PDMA_REDIRECT) {
...

This in two places.

Other than that:

Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>