All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Greg Rose <gregory.v.rose@intel.com>,
	Yuval Mintz <yuvalmin@broadcom.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Ariel Elior <ariele@broadcom.com>,
	Eilon Greenstein <eilong@broadcom.com>,
	linux-pci <linux-pci@vger.kernel.org>
Subject: Re: New commands to configure IOV features
Date: Wed, 19 Sep 2012 23:46:13 +0100	[thread overview]
Message-ID: <1348094773.2636.85.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <CAE9FiQXQj_KdWT-mVVsptxiEgGjScgDy_Lp-aXioZ4YAQh1wWQ@mail.gmail.com>

On Wed, 2012-09-19 at 15:17 -0700, Yinghai Lu wrote:
> On Wed, Sep 19, 2012 at 12:44 PM, Ben Hutchings
> <bhutchings@solarflare.com> wrote:
> > On Wed, 2012-09-19 at 08:53 -0700, Greg Rose wrote:
> >> I was not able to attend the Linux conference held at the end of August
> >> myself but coworkers of mine here at Intel informed that method 2 here
> >> seems to be the preferred approach.  Perhaps some folks who attended
> >> the the conference can chime in with more specifics.
> >
> > There really wasn't much more specific discussion.  Bjorn's summary of
> > the mini-summit <http://lwn.net/Articles/514113/> says:
> >
> >> SR-IOV Management
> >>
> >>     Currently drivers implement module parameters like "max_vfs".  This means
> >>     all devices claimed by the driver get the same number of VFs, and you can't
> >>     change anything without unloading and reloading the driver.
> >>
> >>     Consensus that we should try to implement a knob for this in sysfs so it
> >>     can be generic (not in each driver) and set individually for each device.
> >
> > I don't think any implementation has been posted to the linux-pci list
> 
> please check attached three patches...
[...]
> --- linux-2.6.orig/drivers/pci/pci-sysfs.c
> +++ linux-2.6/drivers/pci/pci-sysfs.c
> @@ -459,6 +459,30 @@ boot_vga_show(struct device *dev, struct
>  }
>  struct device_attribute vga_attr = __ATTR_RO(boot_vga);
>  
> +static ssize_t
> +max_vfs_show(struct device *dev, struct device_attribute *attr, char *buf)
> +{
> +       struct pci_dev *pdev = to_pci_dev(dev);
> +
> +       return sprintf(buf, "%u\n", pdev->max_vfs);
> +}
> +static ssize_t
> +max_vfs_store(struct device *dev, struct device_attribute *attr,
> +                const char *buf, size_t count)
> +{
> +       unsigned long val;
> +       struct pci_dev *pdev = to_pci_dev(dev);
> +
> +       if (strict_strtoul(buf, 0, &val) < 0)
> +               return -EINVAL;
> +
> +       pdev->max_vfs = val;
> +
> +       return count;
> +}
[...]

Then what would actually trigger creation of the VFs?  There's no way we
can assume that some sysfs attribute will be written before the PF
driver is loaded (what if it's built-in?).  I thought the idea was to
add a driver callback that would be called when the sysfs attribute was
written.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2012-09-19 22:46 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 11:17 New commands to configure IOV features Yuval Mintz
2012-05-07 15:16 ` Greg Rose
2012-06-26 12:21   ` Yuval Mintz
2012-06-26 16:13     ` Alexander Duyck
2012-06-26 17:19     ` Greg Rose
2012-07-01 11:09       ` Yuval Mintz
2012-07-09 18:39       ` Ben Hutchings
2012-07-09 21:13         ` Chris Friesen
2012-07-16  9:19           ` Yuval Mintz
2012-07-17 19:29             ` Don Dutile
2012-07-17 21:08               ` Chris Friesen
2012-07-17 21:11                 ` David Miller
2012-07-20 15:27                   ` Chris Friesen
2012-07-20 15:56                     ` Don Dutile
2012-07-20 17:42                       ` Ben Hutchings
2012-07-20 19:29                         ` Chris Friesen
2012-07-20 20:01                           ` Ben Hutchings
2012-07-20 20:15                             ` Don Dutile
2012-07-20 23:42                             ` Chris Friesen
2012-07-21  0:52                               ` Rose, Gregory V
2012-07-23 14:03                               ` Don Dutile
2012-07-23 15:09                                 ` Chris Friesen
2012-07-23 17:06                                   ` Rose, Gregory V
2012-07-23 18:36                                   ` Stephen Hemminger
2012-07-23 18:40                                     ` Rose, Gregory V
2012-09-19 11:07                                       ` Yuval Mintz
2012-09-19 15:53                                         ` Greg Rose
2012-09-19 19:44                                           ` Ben Hutchings
2012-09-19 22:17                                             ` Yinghai Lu
2012-09-19 22:46                                               ` Ben Hutchings [this message]
2012-09-20  0:19                                                 ` Yinghai Lu
2012-09-20  1:23                                                   ` Ben Hutchings
2012-09-20  2:27                                                     ` Yinghai Lu
2012-09-20  3:08                                                       ` Subhendu Ghosh
2012-09-20 15:39                                                     ` Rose, Gregory V
2012-09-20 15:39                                                       ` Rose, Gregory V
2012-09-21  5:50                                                       ` Yinghai Lu
2012-09-21 17:35                                                         ` Ben Hutchings
2012-09-21 19:23                                                           ` Yinghai Lu
2012-09-21 18:06                                                         ` Don Dutile
2012-09-21 18:06                                                           ` Don Dutile
2012-09-21 19:49                                                           ` Yinghai Lu
2012-09-21 20:08                                                             ` Don Dutile
2012-09-21 20:08                                                               ` Don Dutile
2012-09-23 15:49                                                               ` Yuval Mintz
2012-09-24 17:37                                                                 ` Don Dutile
2012-09-24 17:37                                                                   ` Don Dutile
2012-09-30  6:39                                                               ` Yuval Mintz
2012-10-01 14:12                                                                 ` Don Dutile
2012-10-01 14:12                                                                   ` Don Dutile
2012-09-19 17:49                                         ` David Miller
2012-07-23 16:37                                 ` Rose, Gregory V

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=1348094773.2636.85.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=ariele@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=gregory.v.rose@intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yinghai@kernel.org \
    --cc=yuvalmin@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.