lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1e1f1e0d-520a-e2f9-15cb-09e97cd4a836@deltatee.com>
Date:   Tue, 17 Jul 2018 14:51:40 -0600
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Matthew Wilcox <willy@...radead.org>, Martin Mares <mj@....cz>
Cc:     linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        linux-doc@...r.kernel.org, Stephen Bates <sbates@...thlin.com>,
        Christoph Hellwig <hch@....de>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Jonathan Corbet <corbet@....net>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Marc Zyngier <marc.zyngier@....com>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Jérôme Glisse <jglisse@...hat.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Alex Williamson <alex.williamson@...hat.com>,
        Christian König <christian.koenig@....com>
Subject: Re: lspci: Display path to device



On 17/07/18 02:39 PM, Matthew Wilcox wrote:
> On Tue, Jul 17, 2018 at 11:02:00AM -0600, Logan Gunthorpe wrote:
>> The second patch expands the new helper to optionally take a path of
>> PCI devfns. This is to address Alex's renumbering concern when using
>> simple bus-devfns. The implementation is essentially how he described it and
>> similar to the Intel VT-d spec (Section 8.3.1).
> 
> I don't like telling the user to grovel around lspci -t by hand.  It's
> not many lines of code to add a new -P option to lspci to show the path
> to each device instead of bus:dev.fn

Thanks, this looks great! I also found parsing the lspci -t output
cumbersome.

I've also got patches pending for switchtec-user[1] that help users find
the path of downstream ports for Microsemi switches. (An example is
shown below). As the ACS feature is primarily for PCI switch users, this
should help a good segment of people. The lspci patches should cover a
lot more people though.

Logan

sudo switchtec status /dev/switchtec0 -v
Partition 0:    (LOCAL)
    Logical Port ID 0 (USP):
	Phys Port ID:    	32 (Stack 4, Port 0)
	Bus-Dev-Func:    	0000:02:00.0
	Bus-Dev-Func Path:	0000:00:02:0/00.0
	Status:          	UP
	LTSSM:           	L0
	Max-Width:       	x16
	Neg Width:       	x16
	Rate:            	Gen3 - 8 GT/s  15.76 GB/s
	Out Bytes:       	70.3 GB
	In Bytes:        	70.8 GB
    Logical Port ID 1 (DSP):
	Phys Port ID:    	8 (Stack 1, Port 0)
	Bus-Dev-Func:    	0000:03:00.0
	Bus-Dev-Func Path:	0000:00:02:0/00.0/00.0
	Status:          	UP
	LTSSM:           	L0
	Max-Width:       	x8
	Neg Width:       	x8
	Rate:            	Gen3 - 8 GT/s  7.88 GB/s
	Out Bytes:       	12.2 MB
	In Bytes:        	441 MB
	ACS:             	SrcValid- TransBlk- ReqRedir- CmpltRedir-
UpstreamFwd- EgressCtrl- DirectTrans-
	Device:          	10b5:8724 (0000:04:00.0)
	                 	0000:05
    Logical Port ID 2 (DSP):
	Phys Port ID:    	12 (Stack 1, Port 4)
	Bus-Dev-Func:    	0000:03:01.0
	Bus-Dev-Func Path:	0000:00:02:0/00.0/01.0
	Status:          	UP
	LTSSM:           	L0
	Max-Width:       	x8
	Neg Width:       	x8
	Rate:            	Gen3 - 8 GT/s  7.88 GB/s
	Out Bytes:       	1.65 MB
	In Bytes:        	107 MB
	ACS:             	SrcValid- TransBlk- ReqRedir- CmpltRedir-
UpstreamFwd- EgressCtrl- DirectTrans-
	Device:          	11f8:f117 (0000:0b:00.0)
	                 	nvme4




[1] https://github.com/Microsemi/switchtec-user/pull/25

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ