Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755084AbdGKABo (ORCPT ); Mon, 10 Jul 2017 20:01:44 -0400 Received: from mail-dm3nam03on0099.outbound.protection.outlook.com ([104.47.41.99]:51840 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755046AbdGKABm (ORCPT ); Mon, 10 Jul 2017 20:01:42 -0400 From: Casey Leedom To: Alexander Duyck CC: Ding Tianhong , "ashok.raj@intel.com" , "helgaas@kernel.org" , "Michael Werner" , Ganesh GR , "asit.k.mallick@intel.com" , "patrick.j.cramer@intel.com" , "Suravee.Suthikulpanit@amd.com" , "Bob.Shaw@amd.com" , "l.stach@pengutronix.de" , "amira@mellanox.com" , "gabriele.paoloni@huawei.com" , "David.Laight@aculab.com" , "jeffrey.t.kirsher@intel.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "mark.rutland@arm.com" , "robin.murphy@arm.com" , "davem@davemloft.net" , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 0/3] Add new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Thread-Topic: [PATCH v6 0/3] Add new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Thread-Index: AQHS61FojWeFUbyhA0yWrtj3U/TwHqJI9lhqgAAypGyAAAfkgIAAEO11gAAetwCABHWFAw== Date: Tue, 11 Jul 2017 00:01:37 +0000 Message-ID: References: <1498133721-21152-1-git-send-email-dingtianhong@huawei.com> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=chelsio.com; x-originating-ip: [12.32.117.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR12MB1440;7:85u9s0Jae9nEvNW+FsRdEfvtP3nvIVy5rYyb2/h3rfv5H8cZn5diAG77rlol+v/inbpA9gcTIeHkwr7nTKVaTJAtw2tSS0b3IlhSadDOJw2SNiayC/eEuH2mhocKCQDui3e67o74VA/iTq7u+RTXqlqYYoOZqXsUJ/30I5sOlqKq/DltWfIqvHmVgffd9J/mLmXFAud24qGXN8aOs4mKTO1zdNs+8KIBGaxQUBscMWXX/HnE64NkSqGbrKeh/UmCARWoW7ZBmDG8AXjdcZ4+BAsjm3KGIDXd+oiE38Lju5qTg8YSyLktTCTDLb7TYsU3H6ZZGxuUjrRnKtqNyvGusCiq+lLtOhmkdE+LGcXTFLG/1QDmtYIJxYQ/SF1ssU3jwcl2ohY2+5kN1qE7vtnEzm5NaaSMJZXt0cns/44/2GK7spMah1yFQlHb3Kblu6qh653lV3l9+WksLnPsGgdWRnoivtc5DQO4Jp1aQSsS4L9dUOF3kVQSrCQRBhTYNeNZbHGCR/SctfTVp1b7gSY1u8qsp1Z6YhMgz8kM/VcrZrlpgSsyMs4EJ1NGHMiy5txh4LkLei1y2aAANxEKIURx4BIRnaymjumu4zrZbenfhhPtpJE4OdtlGpXOMzY1ivA29tFpgXHU0Duwi+1aggTgdtgZeZJpPscqjqtGzViD4sKhnvCnMvrETxpnZX8JxjAVUCYSsTeydCB6y9Y3uhEyL9XuSGoxFlZ5k51FIhg0MJt47JysQwGPCq73o+CYH8r4cTJpXJkQ7yG1hrNwhefKS+/p2JFM9IqgGFkfSasnFmY= x-ms-office365-filtering-correlation-id: 63ee8451-33bd-46bd-9982-08d4c7f00060 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR12MB1440; x-ms-traffictypediagnostic: MWHPR12MB1440: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(133145235818549)(236129657087228)(48057245064654)(148574349560750); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(2016111802025)(20161123560025)(20161123558100)(6072148)(6043046)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR12MB1440;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR12MB1440; x-forefront-prvs: 0365C0E14B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39450400003)(39840400002)(39400400002)(51444003)(6506006)(5660300001)(50986999)(7736002)(39060400002)(93886004)(76176999)(81166006)(38730400002)(6246003)(8936002)(33656002)(54356999)(110136004)(7416002)(8676002)(74316002)(3660700001)(305945005)(53936002)(3280700002)(14454004)(66066001)(229853002)(6436002)(8666007)(55016002)(7696004)(189998001)(2906002)(99286003)(3846002)(54906002)(6116002)(9686003)(102836003)(478600001)(2950100002)(4326008)(2900100001)(86362001)(6916009)(77096006)(25786009);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR12MB1440;H:MWHPR12MB1600.namprd12.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-OriginatorOrg: chelsio.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jul 2017 00:01:37.5835 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 065db76d-a7ae-4c60-b78a-501e8fc17095 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1440 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v6B01se1027686 Content-Length: 2332 Lines: 43 Hey Alexander, Okay, I understand your point regarding the "most likely scenario" being TLPs directed upstream to the Root Complex. But I'd still like to make sure that we have an agreed upon API/methodology for doing Peer-to-Peer with Relaxed Ordering and no Relaxed Ordering to the Root Complex. I don't see how the proposed APIs can be used in that fashion. Right now the proposed change for cxgb4 is for it to test its own PCIe Capability Device Control[Relaxed Ordering Enable] in order to use that information to program the Chelsio Hardware to emit/not emit upstream TLPs with the Relaxed Ordering Attribute set. But if we're going to have the mixed mode situation I describe, the PCIe Capability Device Control[Relaxed Ordering Enable] will have to be set which means that we'll be programming the Chelsio Hardware to send upstream TLPs with Relaxed Ordering Enable to the Root Complex which is what we were trying to avoid in the first place ... [[ And, as I noted on Friday evening, the currect cxgb4 Driver hardwires the Relaxed Ordering Enable on early dureing device probe, so that would minimally need to be addressed even if we decide that we don't ever want to support mixed mode Relaxed Ordering. ]] We need some method of telling the Chelsio Driver that it should/shouldn't use Relaxed Ordering with TLPs directed at the Root Complex. And the same is true for a Peer PCIe Device. It may be that we should approach this from the completely opposite direction and instead of having quirks which identify problematic devices, have quirks which identify devices which would benefit from the use of Relaxed Ordering (if the sending device supports that). That is, assume the using Relaxed Ordering shouldn't be done unless the target device says "I love Relaxed Ordering TLPs" ... In such a world, an NVMe or a Graphics device might declare love of Relaxed Ordering and the same for a SPARC Root Complex (I think that was your example). By the way, the sole example of Data Corruption with Relaxed Ordering is the AMD A1100 ARM SoC and AMD appears to have given up on that almost as soon as it was released. So what we're left with currently is a performance problem on modern Intel CPUs ... (And hopefully we'll get a Technical Publication on that issue fairly soon.) Casey