Received: by 10.223.185.116 with SMTP id b49csp7997471wrg; Thu, 1 Mar 2018 15:07:59 -0800 (PST) X-Google-Smtp-Source: AG47ELukEFyvZMVs2gIDiPVn2ij98MGjO+wLGonfp4TB1D0tRvpe5ayOow9WuH3x4SX06ICQ1ug/ X-Received: by 2002:a17:902:5a1:: with SMTP id f30-v6mr3371367plf.124.1519945679762; Thu, 01 Mar 2018 15:07:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519945679; cv=none; d=google.com; s=arc-20160816; b=dv45CVYXgIeTo8dEMABQyJZR+hGY5o6wboMJLMrLZ4sBSyrkkGqpk4COuvBEgLAffI nU/OsP2CB+YcghB0KcuMfMz1u3kj8g83w4Cl9SVVk5MlFgApVJwqZTQ9ui1BZROt6Uv+ wdupaeBeAhZVpXRuctn7s2UUwc0VBmb0gsEgLLg4eyHYNtqBhkLL5aMCiaHuKNX/1tBD EE/UQ9+HWrnn0o64zSG79p9L63nYJw8/mxEISRkEDT7IrcrwPz4TKIirtokCsvwO0GRJ 4DAcsW6sgsNMvS0PnJW3FoCCvoSHn6iIMe35W4t79snPVAsf0V95loBKlFJclrdC6+de C77A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:arc-authentication-results; bh=kbAWgzhPqIxbbyYUhgo9nwM9X5OdzrA6d1/FQX1UiYw=; b=u2KXDylA3b04upVudfcu4Ab7xwKTTff5DyAPlhLPatpiJbrlaxm24Vzv3GFr9LeeMN 1EgN1srIglCHxXzjAlKsmC5i6/0PHujQ5jmzgmx7DUKaps/9Y/xRlR+x6FUlLtIluOtn jaQhM7Ext3Du4auKMag/sU2SlykZqlvncP/ikQ7CnIVzlXTElnAB1RRXGHN9XjKyo8ZU H9tj9aOSB2hdRc22DCmcqQICz+KQ4Ke5YZyaofMNPMXabx/dr0Anv+viBRqvWIJz72RM 9CjZdCR3s5m/eyvEdczRZQRDgFNuLObiW2MbEDKDBW8FqSqIu+NNjNJVPMJ4N/8BHtC7 mmfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si3060496pgc.671.2018.03.01.15.07.44; Thu, 01 Mar 2018 15:07:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162834AbeCAXHC (ORCPT + 99 others); Thu, 1 Mar 2018 18:07:02 -0500 Received: from ale.deltatee.com ([207.54.116.67]:39494 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162686AbeCAXHA (ORCPT ); Thu, 1 Mar 2018 18:07:00 -0500 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1erXHl-0002uc-0N; Thu, 01 Mar 2018 16:06:49 -0700 To: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org, Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson References: <20180228234006.21093-1-logang@deltatee.com> <20180228234006.21093-2-logang@deltatee.com> <20180301173752.GE13722@bhelgaas-glaptop.roam.corp.google.com> <20180301230032.GA74737@bhelgaas-glaptop.roam.corp.google.com> From: Logan Gunthorpe Message-ID: Date: Thu, 1 Mar 2018 16:06:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180301230032.GA74737@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: alex.williamson@redhat.com, benh@kernel.crashing.org, jglisse@redhat.com, dan.j.williams@intel.com, maxg@mellanox.com, jgg@mellanox.com, bhelgaas@google.com, sagi@grimberg.me, keith.busch@intel.com, axboe@kernel.dk, hch@lst.de, sbates@raithlin.com, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, helgaas@kernel.org X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v2 01/10] PCI/P2PDMA: Support peer to peer memory X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I don't think this is correct. A Root Port defines a hierarchy domain > (I'm looking at PCIe r4.0, sec 1.3.1). The capability to route > peer-to-peer transactions *between* hierarchy domains is optional. I > think this means a Root Complex is not required to route transactions > from one Root Port to another Root Port. > > This doesn't say anything about routing between two different devices > below a Root Port. Those would be in the same hierarchy domain and > should follow the conventional PCI routing rules. Of course, since a > Root Port has one link that leads to one device, they would probably > be different functions of a single multi-function device, so I don't > know how practical it would be to test this. Yes, given that there's only one device below a root port it will either be a switch or a multi-function device. In the multi-function device case, I'm pretty sure the spec disallows routing-to-self so doing a P2P transaction in that sense isn't going to work unless the device specifically supports it and intercepts the traffic before it gets to the port. But, if we're talking about multi-function devices it should be able to do everything within it's own driver so it's not exactly Peer-to-Peer. Still, if someone has such hardware I think it's up to them to add support for this odd situation. Logan