mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-pci <linux-pci@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	willy@linux.intel.com
Subject: Re: [PATCH] PCI: create function symlinks in /sys/bus/pci/slots/N/
Date: Wed, 10 Mar 2010 11:15:45 -0700	[thread overview]
Message-ID: <20100310181544.GB10446@ldl.fc.hp.com> (raw)
In-Reply-To: <4B95A171.5000207@jp.fujitsu.com>

Hello Kenji-san,

* Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
> Alex Chiang wrote:
>> Create convenience symlinks in sysfs, linking slots to device
>> functions, and vice versa. These links make it easier for users to
>> figure out which devices actually live in what slots.
>>
>> For example:
>>
>> sapphire:/sys/bus/pci/slots # ls
>> 1  10  2  3  4  5  6  7  8  9
>>
>> sapphire:/sys/bus/pci/slots # ls -l 3
>> total 0
>> -r--r--r-- 1 root root 65536 Aug 18 14:10 address
>> lrwxrwxrwx 1 root root     0 Aug 18 14:10 function0 ->
>> ../../../../devices/pci0000:23/0000:23:01.0
>> lrwxrwxrwx 1 root root     0 Aug 18 14:10 function1 ->
>> ../../../../devices/pci0000:23/0000:23:01.1
>>
>
> I usually get the similar information like the followings. Is
> it not enough for you?
>
> # /sbin/lspci -s `cat /sys/bus/pci/slots/1/address`
> 40:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
> 40:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
>
>> sapphire:/sys/bus/pci/slots # ls -l 3/function0/slot
>> lrwxrwxrwx 1 root root 0 Aug 18 14:13 3/function0/slot ->
>> ../../../bus/pci/slots/3
>
> IIRC, the latest 'lspci' command shows physical slot
> information (you added this useful feature, didn't you?). Is it
> not enough for you?

You're right, it's certainly possible to get all that information
using lspci (and yes, I did add the physical slot information ;).

I just thought that these symlinks would be quite convenient, so
that you don't have to traverse around in the sysfs tree quite so
much if you want to find other properties of your physical
device, such as net:ethX, etc.

However, I talked with my manageability userspace team and they
do not really need the links either.

I'll leave it up to Jesse. I think this is a useful feature, I
don't think it's too hard to support as a kernel ABI, but I also
agree that it's not entirely necessary.

Thanks.
/ac


  reply	other threads:[~2010-03-10 18:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 17:24 Alex Chiang
2010-03-09  1:16 ` Kenji Kaneshige
2010-03-10 18:15   ` Alex Chiang [this message]
2010-03-19 21:46 ` Jesse Barnes
2010-03-20 17:52   ` Yinghai Lu
2010-03-20 18:22     ` Yinghai Lu
2010-03-22 18:17     ` Alex Chiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100310181544.GB10446@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=willy@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome