From: Bjorn Helgaas <helgaas@kernel.org>
To: Aya Levin <ayal@mellanox.com>
Cc: Ding Tianhong <dingtianhong@huawei.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Tariq Toukan <tariqt@mellanox.com>,
Tal Gilboa <talgi@mellanox.com>,
linux-pci@vger.kernel.org
Subject: Re: Adding support for Relaxed ordering on a non-root device
Date: Fri, 5 Jun 2020 14:08:09 -0500 [thread overview]
Message-ID: <20200605190809.GA1144451@bjorn-Precision-5520> (raw)
In-Reply-To: <1591274148-12230-1-git-send-email-ayal@mellanox.com>
On Thu, Jun 04, 2020 at 03:35:48PM +0300, Aya Levin wrote:
> Hi
>
> I am writing to you regarding your commits titled:
> 1. a99b646afa8a PCI: Disable PCIe Relaxed Ordering if unsupported
> 2. 87e09cdec4da PCI: Disable Relaxed Ordering for some Intel processors
>
> While adding support to relaxed ordering on Mellanox Ethernet driver I
> tried to avoid the Intel's bug with pcie_relaxed_ordering_enabled.
> Expecting this to return False on Haswell and Broadwell CPU. I run
> this API on: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz (I think it is
> a Haswell, right?) and the API returned True. What am I missing?
The quirk is based on Vendor/Device ID, which of course is a problem
as new devices are released. What does "lspci -vn" show on your
system?
> In addition, I saw your comment in pci_configure_relaxed_ordering
> (pasted below) the non-root ports are not handled since Peer-to-Peer
> DMA is another can of warms. Could you elaborate on the complexity?
> What is the effort to extend this to non-root ports?
There's some discussion about this here and in other parts of the same
thread:
https://lore.kernel.org/linux-arm-kernel/20170809032503.GB7191@bhelgaas-glaptop.roam.corp.google.com/
> ---------------------------------------------------------------------
> static void pci_configure_relaxed_ordering(struct pci_dev *dev)
> {
> struct pci_dev *root;
>
> /* PCI_EXP_DEVICE_RELAX_EN is RsvdP in VFs */
> if (dev->is_virtfn)
> return;
>
> if (!pcie_relaxed_ordering_enabled(dev))
> return;
>
> /*
> * For now, we only deal with Relaxed Ordering issues with Root
> * Ports. Peer-to-Peer DMA is another can of worms.
> */
> root = pci_find_pcie_root_port(dev);
> if (!root)
> return;
>
> if (root->dev_flags & PCI_DEV_FLAGS_NO_RELAXED_ORDERING) {
> pcie_capability_clear_word(dev, PCI_EXP_DEVCTL,
> PCI_EXP_DEVCTL_RELAX_EN);
> pci_info(dev, "Relaxed Ordering disabled because the Root Port didn't support it\n");
> }
> }
>
>
next prev parent reply other threads:[~2020-06-05 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 12:35 Adding support for Relaxed ordering on a non-root device Aya Levin
2020-06-05 19:08 ` Bjorn Helgaas [this message]
2020-06-08 12:44 ` Aya Levin
2020-06-11 22:36 ` Bjorn Helgaas
2020-06-14 7:56 ` Aya Levin
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=20200605190809.GA1144451@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=ayal@mellanox.com \
--cc=bhelgaas@google.com \
--cc=dingtianhong@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=talgi@mellanox.com \
--cc=tariqt@mellanox.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