[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EE11001F9E5DDD47B7634E2F8A612F2E205620E4@FRAEML521-MBX.china.huawei.com>
Date: Fri, 28 Apr 2017 09:12:57 +0000
From: Gabriele Paoloni <gabriele.paoloni@...wei.com>
To: Casey Leedom <leedom@...lsio.com>,
Bjorn Helgaas <helgaas@...nel.org>,
Alexander Duyck <alexander.duyck@...il.com>
CC: Dingtianhong <dingtianhong@...wei.com>,
Mark Rutland <mark.rutland@....com>,
Amir Ancel <amira@...lanox.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Linuxarm <linuxarm@...wei.com>,
David Laight <David.Laight@...lab.com>,
"jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Robin Murphy <robin.murphy@....com>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH net-next 1/4] ixgbe: sparc: rename the
ARCH_WANT_RELAX_ORDER to IXGBE_ALLOW_RELAXED_ORDER
Hi Casey
Many thanks for the detailed explanation
> -----Original Message-----
> From: Casey Leedom [mailto:leedom@...lsio.com]
> Sent: 27 April 2017 21:35
> To: Bjorn Helgaas; Alexander Duyck
> Cc: Dingtianhong; Mark Rutland; Amir Ancel; Gabriele Paoloni; linux-
> pci@...r.kernel.org; Catalin Marinas; Will Deacon; Linuxarm; David
> Laight; jeffrey.t.kirsher@...el.com; netdev@...r.kernel.org; Robin
> Murphy; davem@...emloft.net; linux-arm-kernel@...ts.infradead.org
> Subject: Re: [PATCH net-next 1/4] ixgbe: sparc: rename the
> ARCH_WANT_RELAX_ORDER to IXGBE_ALLOW_RELAXED_ORDER
>
> | From: Bjorn Helgaas <helgaas@...nel.org>
> | Sent: Thursday, April 27, 2017 10:19 AM
> |
> | Are you hinting that the PCI core or arch code could actually
> *enable*
> | Relaxed Ordering without the driver doing anything? Is it safe to do
> that?
> | Is there such a thing as a device that is capable of using RO, but
> where the
> | driver must be aware of it being enabled, so it programs the device
> | appropriately?
>
> I forgot to reply to this portion of Bjorn's email.
>
> The PCI Configuration Space PCI Capability Device Control[Enable
> Relaxed
> Ordering] bit governs enabling the _ability_ for the PCIe Device to
> send
> TLPs with the Relaxed Ordering Attribute set. It does not _cause_ RO
> to be
> set on TLPs. Doing that would almost certainly cause Data Corruption
> Bugs
> since you only want a subset of TLPs to have RO set.
>
> For instance, we typically use RO for Ingress Packet Data delivery
> but
> non-RO for messages notifying the Host that an Ingress Packet has been
> delivered. This ensures that the "Ingress Packet Delivered" non-RO TLP
> is
> processed _after_ any preceding RO TLPs delivering the actual Ingress
> Packet
> Data.
>
> In the above scenario, if one were to turn off Enable Relaxed
> Ordering via
> the PCIe Capability, then the on-chip PCIe engine would simply never
> send a
> TLP with the Relaxed Ordering Attribute set, regardless of any other
> chip
> programming.
>
> And finally, just to be absolutely clear, using Relaxed Ordering
> isn't and
> "Architecture Thing". It's a PCIe Fabric End Point Thing. Many End
> Points
> simply ignore the Relaxed Ordering Attribute (except to reflect it back
> in
> Response TLPs). In this sense, Relaxed Ordering simply provides
> potentially useful optimization information to the PCIe End Point.
I think your view matches what I found out about the current usage of the
"Enable Relaxed Ordering" bit in Linux mainline: i.e. looking at where and
why the other drivers set/clear the "Enable Relaxed Ordering" they do not
look for any global symbol, nor they look at the host architecture.
So with respect to this specific ixgbe driver I guess the main question is
why RO was disabled by default by Intel for this EP (commit 3d5c520727ce
mentions issues with "some chipsets"), then why it is safe to enable it back
on SPARC....?
Thanks
Gab
>
> Casey
Powered by blists - more mailing lists