Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752931Ab0FBGM4 (ORCPT ); Wed, 2 Jun 2010 02:12:56 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:44467 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322Ab0FBGMy (ORCPT ); Wed, 2 Jun 2010 02:12:54 -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=SwZqLtC0NEBnx76UMChgeskV3vxO0E3PN/46SNrtH9v80LCKY5IZlPS3S3KYzeUcx2 CH32oKL3y0jfxfxfKjp78UzeCtTtJD/1ibfNLCJwaqpOTjMqA9gYbtjZbo50iM7LmLn5 mN++jd9oANKoE1PSqtMkaepNWiypekgV2OfLc= MIME-Version: 1.0 In-Reply-To: References: <20100601183920.GB19955@kroah.com> From: Frank Pan Date: Wed, 2 Jun 2010 14:12:33 +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: 1177 Lines: 35 > Furthermore, the links are already there in sysfs, created by the PCI subsystem. > > /sys/class/net/ethX/device links to the PCI device entry for the PF device, which itself has symlinks to each of the VF devices. > > This patch just isn't necessary. I'm not talking about PF's pci device, because PF driver knows it. I'm talking about VF's. The root cause is PF cannot get VF's bdf, so it has no idea where VF is. IMO it's abnormal. Make symlinks is just a use case. When a userspace app only knows VF's bdf, it has no idea how to get into the VF's interface-like directories. (/sys/class/net/ethX/vf[1-7]) Because of: 1. Userspace app cannot get PF's bdf from VF's bdf 2. Userspace app cannot guess the interface name of pf(ethX) So a symlink from /sys/bus/pci/devices/xxxxx to /sys/class/net/ethX/vf[1-7] is useful. This is a real issue. Thanks for reply. -- 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/