From: Bjorn Helgaas <helgaas@kernel.org>
To: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci@vger.kernel.org, "Lukas Wunner" <lukas@wunner.de>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
linux-kernel@vger.kernel.org, "Borislav Petkov" <bp@alien8.de>,
linux-edac@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
"Mahesh J Salgaonkar" <mahesh@linux.ibm.com>,
"Oliver O'Halloran" <oohall@gmail.com>,
"Tony Luck" <tony.luck@intel.com>
Subject: Re: [PATCH v2 1/2] PCI: Track Flit Mode Status & print it with link status
Date: Fri, 21 Feb 2025 17:36:35 -0600 [thread overview]
Message-ID: <20250221233635.GA372807@bhelgaas> (raw)
In-Reply-To: <20250221152948.GA926653@yaz-khff2.amd.com>
On Fri, Feb 21, 2025 at 10:29:48AM -0500, Yazen Ghannam wrote:
> On Fri, Feb 07, 2025 at 06:18:35PM +0200, Ilpo Järvinen wrote:
> > PCIe r6.0 added Flit mode that mainly alters HW behavior but some OS
> > visible changes are also because of it. The OS visible changes include
>
> The first sentence reads oddly. Maybe a slight change?
>
> "...but there are some OS visible changes because of it."
Updated locally.
> > + if (dev->bus && dev->bus->flit_mode)
> > + flit_mode = ", in Flit mode";
> > +
> > if (bw_avail >= bw_cap && verbose)
> > - pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth (%s x%d link)\n",
> > + pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth (%s x%d link)%s\n",
> > bw_cap / 1000, bw_cap % 1000,
> > - pci_speed_string(speed_cap), width_cap);
> > + pci_speed_string(speed_cap), width_cap, flit_mode);
> > else if (bw_avail < bw_cap)
> > - pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)\n",
> > + pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)%s\n",
> > bw_avail / 1000, bw_avail % 1000,
> > pci_speed_string(speed), width,
> > limiting_dev ? pci_name(limiting_dev) : "<unknown>",
> > bw_cap / 1000, bw_cap % 1000,
> > - pci_speed_string(speed_cap), width_cap);
> > + pci_speed_string(speed_cap), width_cap, flit_mode);
>
> Does the "Flit mode" message *need* to go into these lines? Could it be
> its own message?
I suppose it doesn't need to be there, and these bandwidth lines are
already pretty long (my fault, open to suggestions to shorten them),
but I do think it's useful to have related info all on the same line.
> +#include <linux/string_choices.h>
>
> @@ -6190,21 +6190,25 @@ void __pcie_print_link_status(struct pci_dev *dev, bool verbose)
> enum pci_bus_speed speed, speed_cap;
> struct pci_dev *limiting_dev = NULL;
> u32 bw_avail, bw_cap;
>
> bw_cap = pcie_bandwidth_capable(dev, &speed_cap, &width_cap);
> bw_avail = pcie_bandwidth_available(dev, &limiting_dev, &speed, &width);
>
> + if (dev->bus)
> + pci_info(dev, "Flit mode: %s\n", str_enabled_disabled(dev->bus->flit_mode);
> +
> if (bw_avail >= bw_cap && verbose)
> pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth (%s x%d link)\n",
> bw_cap / 1000, bw_cap % 1000,
> pci_speed_string(speed_cap), width_cap);
> else if (bw_avail < bw_cap)
> pci_info(dev, "%u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at %s (capable of %u.%03u Gb/s with %s x%d link)\n",
> bw_avail / 1000, bw_avail % 1000,
> pci_speed_string(speed), width,
> limiting_dev ? pci_name(limiting_dev) : "<unknown>",
> bw_cap / 1000, bw_cap % 1000,
> pci_speed_string(speed_cap), width_cap);
>
> > }
next prev parent reply other threads:[~2025-02-21 23:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 16:18 [PATCH v2 0/2] PCI: Add support for logging Flit Mode TLPs (PCIe6) Ilpo Järvinen
2025-02-07 16:18 ` [PATCH v2 1/2] PCI: Track Flit Mode Status & print it with link status Ilpo Järvinen
2025-02-21 15:29 ` Yazen Ghannam
2025-02-21 23:36 ` Bjorn Helgaas [this message]
2025-02-07 16:18 ` [PATCH v2 2/2] PCI: Handle TLP Log in Flit mode Ilpo Järvinen
2025-02-21 16:19 ` Yazen Ghannam
2025-02-21 23:36 ` [PATCH v2 0/2] PCI: Add support for logging Flit Mode TLPs (PCIe6) Bjorn Helgaas
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=20250221233635.GA372807@bhelgaas \
--to=helgaas@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-edac@vger.kernel.org \
--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=tony.luck@intel.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