From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org, "Krzysztof Wilczyński" <kw@linux.com>,
"Lukas Wunner" <lukas@wunner.de>,
"Yazen Ghannam" <yazen.ghannam@amd.com>,
linux-kernel@vger.kernel.org,
"Mahesh J Salgaonkar" <mahesh@linux.ibm.com>,
"Oliver O'Halloran" <oohall@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v8 5/7] PCI: Store # of supported End-End TLP Prefixes
Date: Fri, 3 Jan 2025 16:36:58 +0000 [thread overview]
Message-ID: <20250103163658.00003c81@huawei.com> (raw)
In-Reply-To: <20241218143747.3159-6-ilpo.jarvinen@linux.intel.com>
On Wed, 18 Dec 2024 16:37:45 +0200
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> wrote:
> eetlp_prefix_path in the struct pci_dev tells if End-End TLP Prefixes
> are supported by the path or not, the value is only calculated if
> CONFIG_PCI_PASID is set.
>
> The Max End-End TLP Prefixes field in the Device Capabilities Register
> 2 also tells how many (1-4) End-End TLP Prefixes are supported (PCIe
> r6.2 sec 7.5.3.15). The number of supported End-End Prefixes is useful
> for reading correct number of DWORDs from TLP Prefix Log register in AER
> capability (PCIe r6.2 sec 7.8.4.12).
>
> Replace eetlp_prefix_path with eetlp_prefix_max and determine the
> number of supported End-End Prefixes regardless of CONFIG_PCI_PASID so
> that an upcoming commit generalizing TLP Prefix Log register reading
> does not have to read extra DWORDs for End-End Prefixes that never will
> be there.
>
> The value stored into eetlp_prefix_max is directly derived from
> device's Max End-End TLP Prefixes and does not consider limitations
> imposed by bridges or the Root Port beyond supported/not supported
> flags. This is intentional for two reasons:
>
> 1) PCIe r6.2 spec sections r6.1 2.2.10.4 & 6.2.4.4 indicate that TLP
> is handled malformed only if the number of prefixes exceed the number
> of Max End-End TLP Prefixes, which seems to be the case even if the
> device could never receive that many prefixes due to smaller maximum
> imposed by a bridge or the Root Port. If TLP parsing is later added,
> this distinction is significant in interpreting what is logged by the
> TLP Prefix Log registers and the value matching to the Malformed TLP
> threshold is going to be more useful.
>
> 2) TLP Prefix handling happens autonomously on a low layer and the
> value in eetlp_prefix_max is not programmed anywhere by the kernel
> (i.e., there is no limiter OS can control to prevent sending more
> than n TLP Prefixes).
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Extra explanation looks good to me.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
next prev parent reply other threads:[~2025-01-03 16:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 14:37 [PATCH v8 0/7] PCI: Consolidate TLP Log reading and printing Ilpo Järvinen
2024-12-18 14:37 ` [PATCH v8 1/7] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem Ilpo Järvinen
2025-01-08 16:05 ` Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 2/7] PCI: Move TLP Log handling to own file Ilpo Järvinen
2025-01-08 16:26 ` Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 3/7] PCI: Make pcie_read_tlp_log() signature same Ilpo Järvinen
2025-01-08 20:40 ` Yazen Ghannam
2025-01-08 22:13 ` Bjorn Helgaas
2024-12-18 14:37 ` [PATCH v8 4/7] PCI: Use unsigned int i in pcie_read_tlp_log() Ilpo Järvinen
2025-01-03 16:38 ` Jonathan Cameron
2024-12-18 14:37 ` [PATCH v8 5/7] PCI: Store # of supported End-End TLP Prefixes Ilpo Järvinen
2025-01-03 16:36 ` Jonathan Cameron [this message]
2025-01-08 20:56 ` Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log() Ilpo Järvinen
2025-01-08 21:33 ` Yazen Ghannam
2025-01-09 9:36 ` Ilpo Järvinen
2025-01-10 14:54 ` Yazen Ghannam
2024-12-18 14:37 ` [PATCH v8 7/7] PCI: Create helper to print TLP Header and Prefix Log Ilpo Järvinen
2025-01-08 15:53 ` [PATCH v8 0/7] PCI: Consolidate TLP Log reading and printing Yazen Ghannam
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=20250103163658.00003c81@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukas@wunner.de \
--cc=mahesh@linux.ibm.com \
--cc=oohall@gmail.com \
--cc=yazen.ghannam@amd.com \
/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;
as well as URLs for NNTP newsgroup(s).