Received: by 10.223.185.116 with SMTP id b49csp8050064wrg; Thu, 1 Mar 2018 16:16:07 -0800 (PST) X-Google-Smtp-Source: AG47ELsBOR/szqzgHOTENY2aqSCUifpR8G5ZDw4w7CEFK47oTAZdWI0vW4ksmBTbVoEbZNk10ZgV X-Received: by 10.98.74.140 with SMTP id c12mr3818315pfj.44.1519949767759; Thu, 01 Mar 2018 16:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519949767; cv=none; d=google.com; s=arc-20160816; b=kO76XKQsNz6gDya9f2WePA1gSpGlc1lA0oTvfNwWLKhYI8A5Hp96fTq2Wplz3VjeQm Wx5g72WxIKwIeJhl3QECT7uPTrdMEVqNv2ooSfBQW5ZlI5pFXHgQJtd7MP/TjNpzKWKH FWXy5ZtO4BzEikGNEEpUFdrRPMFUJ0nwGe+0vjfMpB3jgxbDrLw5OeFVvVHWqqYDUEy9 Si4MZ6LRnyJLGzji6GaTHRfyZxSOb7RkGTRbiiw9NWjgx5FOIY+2OPhKyPqJgwRv9O3v fY5n+f9fSBlLZxUp8k9ImP813TvU3BegODxHd48hI0mOasOyJ2cv1BBN1wlu3qkL/laF 1z8A== 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=qniQO0oKTq/Apx3fJAs6yaAFd20bXQEHKi12uX5f/d0=; b=T0s3gFaDqqEvY4B6Lc3q/YlOK6UA86QmhJZjWPqbymEUcME6ReKcdVHVEi2PCAUewi iA/Bi6WvzFyL/bpHvNjbrzgEce4Cz85/fQ0z6UAPmVRk3Lvf/IjcUmeOSUuqiQBJvpS5 shrD+nGT6DIXbWVC3edy5SNm/em9vCdoT1r4vcdZMvx6+zBtD+hvLMZXuNB3RV3BnHXS VOcVGfmMX4cmBYKILVie8Bd+IoRk4mRvyyel8hp2N8d8d+ZtfcUd7oKFDJFNBtqrN9WG MHR0sC2Ynr52g8lFTXR4rAWBNbkcK5jPuwlSpQ/5sd0zfXnTSFroTXjn7OXYfXk8NEWv 035w== 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 x14si3183209pgq.168.2018.03.01.16.15.53; Thu, 01 Mar 2018 16:16:07 -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 S1163636AbeCAX7p (ORCPT + 99 others); Thu, 1 Mar 2018 18:59:45 -0500 Received: from ale.deltatee.com ([207.54.116.67]:39950 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163541AbeCAX7n (ORCPT ); Thu, 1 Mar 2018 18:59:43 -0500 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1erY6j-0003Lc-2m; Thu, 01 Mar 2018 16:59:29 -0700 To: Bjorn Helgaas , Stephen Bates 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" , 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-5-logang@deltatee.com> <20180301180257.GH13722@bhelgaas-glaptop.roam.corp.google.com> <0D05579B-789C-4A19-B3A2-C1A630BE31C0@raithlin.com> <20180301231536.GB74737@bhelgaas-glaptop.roam.corp.google.com> From: Logan Gunthorpe Message-ID: Date: Thu, 1 Mar 2018 16:59:27 -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: <20180301231536.GB74737@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, 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, sbates@raithlin.com, 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 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches 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 On 01/03/18 04:15 PM, Bjorn Helgaas wrote: > The question is what the relevant switch is. We call pci_enable_acs() > on every PCI device, including Root Ports. It looks like this relies > on get_upstream_bridge_port() to filter out some things. I don't > think get_upstream_bridge_port() is doing the right thing, so we need > to sort that out first, I guess. Yes, well if a port has an upstream bridge port and that port has an upstream bridge port we are almost certainly looking at a port in a switch. If you have a better suggestion to only disable ACS bits on downstream switch ports I'd be happy to consider it. > This might be a good start, but whatever the implications are, they > need to be distilled and made clear directly in the changelog and the > Kconfig help text. Well, I tried. I'll expand on it for v3. Logan