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

Logan Gunthorpe <[email protected]>
Newsgroups org.kernel.vger.linux-doc,dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci
Message-ID <[email protected]>

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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.