Received: by 10.213.65.68 with SMTP id h4csp641519imn; Tue, 13 Mar 2018 16:10:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELsOyTrTWUzIDcKtMKpYDY30d7x79ISGudYjXZVvaOzTN6vrd5zIOitQfl5D/bJpIhc3kNmk X-Received: by 10.99.127.91 with SMTP id p27mr1859893pgn.28.1520982609155; Tue, 13 Mar 2018 16:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520982609; cv=none; d=google.com; s=arc-20160816; b=kEPo2tPr9iwOE5M8iwjY3mwyV2f/3ZnFOiU3Gaky5jKzb87MYMAqNlOEUXNLuQi1j4 pLNFAA1OH3vGCvdnHHf7AOIAs5atIj8EGpDxR5gdvWVqHlOibsJZVl2ABkNjiJsTIHd4 a27yV4VOmmIO0iau+6zbtIpvwXFpUWtIQiUe9tVj+IYXEPxCqG8y+v8iaiDrQPJ5vnty emdR2h3ubYFlKsVhtdxTUo+CD1tBdxJV/yWW3Zgqtq4U17wONDsGZxfdjw2+OcCDHY81 tMdtEQuuBXFp7geMP2oOmq9L0F7W1YLzlkUIsWrQH9PTdU4wctWVdUeLESFinCu6KhIA /3Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=M28oYD/CsTO+BH+M9Dv8W2iwB6SuzTAfAvDntJz+cNY=; b=N6wiJp8gDTwJYO38S9sBRYosQnc3kwl1GQoTUOWQDgu8gZwKUhsNrxKlKiEvy7fiGi 8WYUPEt56PiDpxwoYzEEtyb3IgUSpQEQlTa8Da1kek5r/SaPm0rMcxwQcrUbbIlqS2f1 w96Um4hgzj3xJX5QnJk4vOt93S1Erhx8vSzIC0vS3/Dvd7bZ2mZrV6tR5wxMxX1w/0C+ dhfRiyCBKW+A0Z8ks0wr5VFTbDW4FfbSs3qhSGkbJ00+JshPS5z4silFyKlLHwqhgYu3 b24clxp95lrmbMja+en3Vecri4lyUkOfMsiz4RPQg8ZSevLeXYWvqkZmmwwGNojmNh5b Qaog== 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 a13si964218pfg.61.2018.03.13.16.09.54; Tue, 13 Mar 2018 16:10:09 -0700 (PDT) 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 S932636AbeCMXIz (ORCPT + 99 others); Tue, 13 Mar 2018 19:08:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:59320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932205AbeCMXIx (ORCPT ); Tue, 13 Mar 2018 19:08:53 -0400 Received: from localhost (unknown [69.71.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D8F1F20685; Tue, 13 Mar 2018 23:08:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8F1F20685 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Tue, 13 Mar 2018 18:08:50 -0500 From: Bjorn Helgaas To: Stephen Bates Cc: Logan Gunthorpe , Sinan Kaya , "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" , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?iso-8859-1?B?Suly9G1l?= Glisse , Benjamin Herrenschmidt , Alex Williamson Subject: Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory Message-ID: <20180313230850.GA45763@bhelgaas-glaptop.roam.corp.google.com> References: <24d8e5c2-065d-8bde-3f5d-7f158be9c578@deltatee.com> <52cbbbc4-c488-f83f-8d02-14d455b4efd7@codeaurora.org> <3e738f95-d73c-4182-2fa1-8664aafb1ab7@deltatee.com> <703aa92c-0c1c-4852-5887-6f6e6ccde0fb@codeaurora.org> <3ea80992-a0fc-08f2-d93d-ae0ec4e3f4ce@codeaurora.org> <4eb6850c-df1b-fd44-3ee0-d43a50270b53@deltatee.com> <757fca36-dee4-e070-669e-f2788bd78e41@codeaurora.org> <4f761f55-4e9a-dccb-d12f-c59d2cd689db@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 13, 2018 at 10:31:55PM +0000, Stephen Bates wrote: > >> It sounds like you have very tight hardware expectations for this to work > >> at this moment. You also don't want to generalize this code for others and > >> address the shortcomings. > > No, that's the way the community has pushed this work > > Hi Sinan > > Thanks for all the input. As Logan has pointed out the switch > requirement is something that has evolved over time based on input > from the community. You are more than welcome to have an opinion on > this (and you have made that opinion clear ;-)). Over time the > patchset may evolve from its current requirements but right now we > are aligned with the feedback from the community. This part of the community hasn't been convinced of the need to have two bridges, e.g., both an Upstream Port and a Downstream Port, or two conventional PCI bridges, above the peers. Every PCI-to-PCI bridge is required to support routing transactions between devices on its secondary side. Therefore, I think it is sufficient to verify that the potential peers share a single common upstream bridge. This could be a conventional PCI bridge, a Switch Downstream Port, or a Root Port. I've seen the response that peers directly below a Root Port could not DMA to each other through the Root Port because of the "route to self" issue, and I'm not disputing that. But enforcing a requirement for two upstream bridges introduces a weird restriction on conventional PCI topologies, makes the code hard to read, and I don't think it's necessary. If it *is* necessary because Root Ports and devices below them behave differently than in conventional PCI, I think you should include a reference to the relevant section of the spec and check directly for a Root Port. I would prefer that over trying to exclude Root Ports by looking for two upstream bridges. Bjorn