public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Frank Pan <frankpzh@gmail.com>
Cc: "Williams, Mitch A" <mitch.a.williams@intel.com>,
	Greg KH <greg@kroah.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	Yu Zhao <yu.zhao@intel.com>, Chris Wright <chrisw@sous-sol.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	"David S. Miller" <davem@davemloft.net>,
	Matt Carlson <mcarlson@broadcom.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Add a helper function in PCI IOV to get VF device
Date: Thu, 3 Jun 2010 10:56:43 -0700	[thread overview]
Message-ID: <20100603175643.GY8301@sequoia.sous-sol.org> (raw)
In-Reply-To: <AANLkTilDY61GMGNLezXYLbbe3B8-SvgMOK5L9Q6juETL@mail.gmail.com>

* Frank Pan (frankpzh@gmail.com) wrote:
> hi Mitch,
> 
> > Frank, I'm not sure what you're trying to accomplish here. All of the information you need is already in sysfs. Given the PF device, you can look at /sys/class/net/ethX/device/virtfnX to get the bus/device/function of each of the VF devices.
> 
> Yes, that's the most funny part. Sysfs can only be traversed in
> usespace. So the thing userspace knows isn't known by driver(pf driver
> have no idea about vf's bdf), while the thing driver knows isn't known
> by userspace(one cannot infer pf's bdf from vf's bdf).
> Please think kernel/userspace as 2 system, they can hardly communicate
> these informations. IMHO give a syscall/ioctl telling these is funny
> and strange.
> 
> > If the VF driver is loaded in your kernel, then given the bus/device/function of the vf device, you can look at /sys/class/net/ethX/device/virtfnX/net to see which interface corresponds to that VF.
> 
> VF driver will never be loaded on physical machine, it can only be
> loaded in a virtual machine. On a physical machine, VF won't have any
> interface.

VF is often loaded on the physical machine.  There's also a networking
specific mechanism for querying and configuring a VF via the PF.

While your patch is simple, it's unclear to me what your end goal is.
The patch itself only adds a function. if you showed how you are
planning to use it, that would really help.

It's especially confusing that you are comparing your patch with
symlinks visible in sysfs.

thanks,
-chris

  parent reply	other threads:[~2010-06-03 17:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01  5:05 Add a helper function in PCI IOV to get VF device Frank Pan
2010-06-01 18:39 ` Greg KH
2010-06-01 18:57   ` Williams, Mitch A
2010-06-02  6:12     ` Frank Pan
2010-06-02 18:59       ` Williams, Mitch A
2010-06-03  2:57         ` Frank Pan
2010-06-03  3:11           ` Frank Pan
2010-06-03 17:10             ` Williams, Mitch A
2010-06-04  2:28               ` Frank Pan
2010-06-03 17:56           ` Chris Wright [this message]
2010-06-04  2:43             ` Frank Pan
2010-06-08 22:12               ` Chris Wright
2010-06-02  6:02   ` Frank Pan
2010-06-08 21:35 ` Jesse Barnes
2010-06-11  7:42   ` Frank Pan
2010-06-18 17:17     ` Jesse Barnes

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=20100603175643.GY8301@sequoia.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=frankpzh@gmail.com \
    --cc=greg@kroah.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mcarlson@broadcom.com \
    --cc=mitch.a.williams@intel.com \
    --cc=rjw@sisk.pl \
    --cc=yu.zhao@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