From: sashiko-bot@kernel.org
To: "Leon Romanovsky" <leon@kernel.org>
Cc: linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rdma@vger.kernel.org, kvm@vger.kernel.org,
media-ci@linuxtv.org
Subject: Re: [PATCH v11 09/19] PCI/P2PDMA: Route Relaxed Ordering Completions directly
Date: Tue, 13 Oct 2026 14:37:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-169923@kernel.org> (raw)
In-Reply-To: <20261013-fix-p2p-acs-v4-0-v11-9-72cf8c96e617@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] pci/p2pdma: false positive warning if Relaxed Ordering route succeeds
--
commit e6e15dbbdb2b5d6dee258b1197f71025a221015f
Author: Leon Romanovsky <leon@kernel.org>
PCI/P2PDMA: Route Relaxed Ordering Completions directly
ACS P2P Completion Redirect leaves Completions carrying Relaxed Ordering
alone, per PCIe r7.0 sec 6.12.1.1. A Completion copies that attribute from
its Request, so a client setting it on Non-Posted Requests need not use the
host bridge solely because Completion Redirect is enabled.
Route Completions directly for PCI_P2PDMA_TLP_RELAXED_CPL unless a device
quirk redirects them or the Completer lacks an internal route to its
sibling. Neither restriction promises a Relaxed Ordering exception. No
caller selects these classes yet.
> diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
> index 9d416329aa4b8..785e4668a2af5 100644
> --- a/drivers/pci/p2pdma.c
> +++ b/drivers/pci/p2pdma.c
> @@ -580,11 +580,15 @@ pci_acs_p2pdma_request(u16 ctrl, unsigned int tlp_flags)
> /*
> * Decide how a peer-to-peer Completion at an ACS-capable ingress port routes.
> * PCIe r7.0 sec 6.12.1.1: no ACS control other than P2P Completion Redirect
> - * affects a Completion.
> + * affects a Completion, and that one leaves Completions carrying the Relaxed
> + * Ordering attribute alone.
> */
> static enum pci_acs_p2pdma_state
> pci_acs_p2pdma_completion(u16 ctrl, unsigned int tlp_flags)
> {
> + if (tlp_flags & PCI_P2PDMA_TLP_RELAXED_CPL)
> + return PCI_ACS_P2PDMA_DIRECT;
> +
[Severity: Low]
Now that Relaxed Ordering completions can route directly while strict ordering
might still redirect, does this cause a false positive warning in
calc_map_type_and_dist() in drivers/pci/p2pdma.c?
calc_map_type_and_dist() iterates over all PCI_P2PDMA_TLP_CLASSES and sets
host_fallback = true if any class requires the host bridge:
for (flags = 0; flags < PCI_P2PDMA_TLP_CLASSES; flags++) {
map_type[flags] = pci_p2pdma_route(&path, flags);
if (map_type[flags] == PCI_P2PDMA_MAP_THRU_HOST_BRIDGE)
host_fallback = true;
}
Later, if the host bridge does not support P2PDMA, it emits an unconditional
warning for the device:
if (!cpu_p2pdma && !host_whitelisted) {
if (verbose)
pci_warn(client, "cannot be used for peer-to-peer DMA...");
}
If a caller successfully requests a Relaxed Ordering route that maps directly,
but the strict ordering route required the host bridge, will this
unconditional warning mislead users into thinking P2P DMA is completely
broken for their setup?
> return ctrl & PCI_ACS_CR ? PCI_ACS_P2PDMA_REDIRECT :
> PCI_ACS_P2PDMA_DIRECT;
> }
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013-fix-p2p-acs-v4-0-v11-0-72cf8c96e617@nvidia.com?part=9
next prev parent reply other threads:[~2026-10-13 14:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 14:25 [PATCH v11 00/19] PCI/P2PDMA: Route peer-to-peer DMA by TLP class Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 01/19] PCI/P2PDMA: Honor device-specific ACS redirection Leon Romanovsky
2026-10-13 14:44 ` sashiko-bot
2026-10-13 14:25 ` [PATCH v11 02/19] PCI/P2PDMA: Document the TLP attribute assumptions Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 03/19] PCI/P2PDMA: Derive routing from directional ACS controls Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 04/19] PCI: Reject unreadable ACS controls in isolation checks Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 05/19] PCI/P2PDMA: Evaluate ACS controls at the path divergence Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 06/19] PCI/P2PDMA: Document directional ACS routing Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 07/19] PCI/P2PDMA: Collect the path's ACS controls before deciding Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 08/19] PCI/P2PDMA: Answer routing per TLP class Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 09/19] PCI/P2PDMA: Route Relaxed Ordering Completions directly Leon Romanovsky
2026-10-13 14:37 ` sashiko-bot [this message]
2026-10-13 14:25 ` [PATCH v11 10/19] PCI/P2PDMA: Reject Translated Requests blocked by Translation Blocking Leon Romanovsky
2026-10-13 14:49 ` sashiko-bot
2026-10-13 14:25 ` [PATCH v11 11/19] PCI/P2PDMA: Route Translated Requests under Direct Translated P2P Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 12/19] PCI/P2PDMA: Log detailed ACS routing diagnostics Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 13/19] PCI/P2PDMA: Add KUnit tests for the ACS routing decisions Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 14/19] PCI/P2PDMA: Test the ACS P2P routing walk Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 15/19] PCI: Add KUnit coverage for ACS isolation checks Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 16/19] PCI/P2PDMA: Document TLP-class routing Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 17/19] PCI/P2PDMA: Let a client declare that it selects ATS per mapping Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 18/19] PCI/P2PDMA: Evaluate the ATS path for clients with ATS enabled Leon Romanovsky
2026-10-13 14:25 ` [PATCH v11 19/19] PCI/P2PDMA: Test the routing of " Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-169923@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kvm@vger.kernel.org \
--cc=leon@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox