Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933745Ab0FCDLn (ORCPT ); Wed, 2 Jun 2010 23:11:43 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:48896 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933579Ab0FCDLl (ORCPT ); Wed, 2 Jun 2010 23:11:41 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=PZ+T1+lymmtkAoPgLKVI9iG27JMSZWixAgo9sA/loGOkIY9ygIXeQDBH4PExVNDZRT DUdgrkNVwevexbFfZ8VWGUKbbmuNNqSslgBreJuqBZYAUV4c2lUHVupISlnhhFPQvLtT CmOXp3pkNvCWZSw733DlJzVs9V1x/LFR8cJf0= MIME-Version: 1.0 In-Reply-To: References: <20100601183920.GB19955@kroah.com> From: Frank Pan Date: Thu, 3 Jun 2010 11:11:21 +0800 Message-ID: Subject: Re: Add a helper function in PCI IOV to get VF device To: "Williams, Mitch A" Cc: Greg KH , Andrew Morton , Jesse Barnes , Kenji Kaneshige , Yu Zhao , Chris Wright , "Rafael J. Wysocki" , "David S. Miller" , Matt Carlson , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1076 Lines: 29 > So, when VF has no interface, this path is also unavailable. That's > why I say given vf's bdf, one cannot infer pf's. Sorry I just missed something. Userspace can find pf's bdf by physfn. So, the motivation is provide some information about vf from pf driver by sysfs. I cannot avoid to create one directory for each vf, like vf0, vf1, etc. Although userspace can find these directories, but it has no idea about which one to use. Userspace just knows vf's bdf, it won't care about/know vf's id. So I have the issue to create a symlink from each vf's /sys/bus/pci/devices/xxxx/ to their corresponding directories. And then comes the issue: PF cannot get VF's bdf in kernel space. This is not a strange issue, hacking every SR-IOV device can met. Thanks. -- Frank Pan Computer Science and Technology Tsinghua University -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/