Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp80981imm; Fri, 10 Aug 2018 07:58:30 -0700 (PDT) X-Google-Smtp-Source: AA+uWPybh0SxPgDCn/3MIHkcwsKT27xiJcS3LC1vLqBPvgwCo1wypmTl3PlEp4tclcjiFuQBzOYC X-Received: by 2002:a62:444d:: with SMTP id r74-v6mr7391140pfa.96.1533913110161; Fri, 10 Aug 2018 07:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533913110; cv=none; d=google.com; s=arc-20160816; b=kk8m9W7tAMnErR8nwHSyrUMx/smRnQU0RmZge2ssZ3NT5PTDbA9gzqzHfP/AAnvdgw 6g76oREW51ew4duHcKP/yA57NmDafi93pDyFV8yde+VTKFiks3ntdV1g5xEsCO88NMP0 A7wUsO5W1fHqVDHlhHa5iRiEPoqqHFyw08lGHWLujwjDd5GoBNoojOMpAMIHX7MFa/AX ZVcAQ6IRbmG/rOI1YMV7B4jYmwB+olg8IL6ojXnJicJJAi+xlol2dDm4DfJCIBnOvY8s 0GY1geS9g4zwzBjO81CE3spQZ2W9mT0DihkUedUoyvDpNRNXIY+QTH/Ahg1KiCaQSkbG aIoQ== 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:dkim-signature:arc-authentication-results; bh=/4HvGf7vv7o1239N3xCs1FG890dHpoi/7nvK0RB4occ=; b=q04YexbrbaLY5l95A97hYtRMKNEKNsM699TBzurHMUXwMUIjPRyxz7LU7y9Vqkq55v et08hkO9FFMJFD6+huqugZJTgSkDOwxNs4NTZ+n/aQbaLEinm38GHppYI/6nnEndprRB jKGCvGwjomRhHBfgdRghPI6V62Zi6Ml6MNI8IMv2TuQmI0L5ZTRK0VxYsKqMYsWqVIt9 P1dNEBTjgQdmJyenKD1qQEWm3LyUjgPsQpNC7nAnJb1DkqyrE3svl4uCfVSTbxwdkaHg jInxx+6uM+0kEs1HtDlDoovYwypxns2wgazJ+9JvuBuZw9jQA7wIlkLSjngKjG60YN8x lD9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HVcJF9NV; 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 v6-v6si7925120ply.300.2018.08.10.07.58.14; Fri, 10 Aug 2018 07:58:30 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HVcJF9NV; 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 S1728028AbeHJR1O (ORCPT + 99 others); Fri, 10 Aug 2018 13:27:14 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43796 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727763AbeHJR1O (ORCPT ); Fri, 10 Aug 2018 13:27:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/4HvGf7vv7o1239N3xCs1FG890dHpoi/7nvK0RB4occ=; b=HVcJF9NV7gDMNIHetrBxsKkyD I25JiCiHoLM+wMX//rwRdyMwCc+IVVjoK4a/rhLYgw2CvOL2YJEdBrs0tIO/u3C8BMiFOlC0IdqNi frZy5yBBfE13KFkK7pkokowOqCa2Zq2R/B8ZmgApNQN9uIfpBtncFxyUquR3e07STYyKg+EFDw/P4 xDhFHwZMUNVctTW1uuycbGO6xJAFL8Z/tR8pDiVNfzN5cleJ//LhViUer47oikuJ+bnGCcBq4W97U FlC7fMS6mMRUMlQ14ro3MAhks4gwGsVL+P8fmi6NDdliePVBU26sBhHaxK4FC++Fu9YYafFgiXHYI jqxWxBiBQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fo8qW-0003P5-1H; Fri, 10 Aug 2018 14:56:56 +0000 Date: Fri, 10 Aug 2018 07:56:55 -0700 From: Matthew Wilcox To: Martin Mares Cc: Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, Stephen Bates , Christoph Hellwig , Bjorn Helgaas , Jonathan Corbet , Ingo Molnar , Thomas Gleixner , "Paul E. McKenney" , Marc Zyngier , Kai-Heng Feng , Frederic Weisbecker , Dan Williams , =?iso-8859-1?B?Suly9G1l?= Glisse , Benjamin Herrenschmidt , Alex Williamson , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: lspci: Display path to device Message-ID: <20180810145655.GA16533@bombadil.infradead.org> References: <20180717170204.30470-1-logang@deltatee.com> <20180717203900.GA1771@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" 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 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 10, 2018 at 12:30:35PM +0200, Martin Mares wrote: > Hello! > > > ... the more I think about it, the more I am convinced that we want to > > re-use the bus topology builder from ls-tree.c. I will give it a try, > > stay tuned. > > Please see the "topology" branch in pciutils.git. Thanks. I found two problems so far. One is that using -P and -s together doesn't work because we haven't scanned the entire topology. $ ./lspci-mw -PF tests/fujitsu-p8010.lspci -s 1d:00.0 00:1e.0/03.0/00.0 Network controller: 3Com Corporation 3com 3CRWE154G72 [Office Connect Wireless LAN Adapter] (rev 01) $ ./lspci-mm -PF tests/fujitsu-p8010.lspci -s 1d:00.0 1d:00.0 Network controller: 3Com Corporation 3com 3CRWE154G72 [Office Connect Wireless LAN Adapter] (rev 01) The other is that even when not using -s, the topology isn't fully represented: $ ./lspci-mm -PF tests/fujitsu-p8010.lspci |grep 3com 00:1e.0/00.0 Network controller: 3Com Corporation 3com 3CRWE154G72 [Office Connect Wireless LAN Adapter] (rev 01) I've attached a compressed form of the fujitsu-p8010.lspci dump for your testing. --6TrnltStXW4iwmi0 Content-Type: application/x-xz Content-Disposition: attachment; filename="fujitsu-p8010.lspci.xz" Content-Transfer-Encoding: base64 /Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4XnWCpldABhg5gCGFJLKE4jgdlYSuquRun6fUBYg aczWWQ4jNHeJD+YmJzRIVFhAPd8EeMwM7QsCfO/spyk6c3TfIrcyZPiJeTHLuM3+Jt4P8v3c vEwLM0oYq5gbOwproyzPI5V3zDfZapPSxcTtGzMQ3k/OEib/nHsTlg7L8yfwXS+jTLXDSmwW wukhdLjXIN6LPBefQueTl5+0Akv4WBmRSGIhYz/h3QiKslIq7jit/gRw7zw8+LScjeAuFUuk bMa6FVz/vJERZGDMOB+R4Xh1cBdKjO84rT6kQj33BVuwqv3mpcp8S7Eg4BUFhkW2YfLfYhkB 1VtvXSHJg2/PNvNhc49uBquCUvkxsC6nFwf/LRw7WARPA9L42ahV/QrLOXJ/+BwFsS+kdIEo D02HweA92wWMhEAYhZdqWB8Mmhe7tk0Szoj85wzMTSYTrS8imf3xp0Jcj3xWV2Tb9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