netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
To: Jack Morgenstein
	<jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: Yevgeny Petrilin
	<yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>,
	<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	<roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
	<liranl-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Subject: Re: [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet
Date: Tue, 6 Dec 2011 17:41:40 +0000	[thread overview]
Message-ID: <1323193300.2772.5.camel@bwh-desktop> (raw)
In-Reply-To: <201112061035.54093.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On Tue, 2011-12-06 at 10:35 +0200, Jack Morgenstein wrote:
> On Monday 05 December 2011 23:26, Ben Hutchings wrote:
> > The 'probe_vf' parameter is very odd.  Why do you think it is necessary
> > to make this a module parameter?  It should be possible to bind and
> > unbind the driver from each VF dynamically via sysfs but this parameter
> > appears to restrict that.
> > 
> The host which sees the PF will also see all the VFs once they come up.
> As each VF appears (as seen by 'lspci'), the O/S will invoke the "probe"
> method for that VF.  Without the "probe_vf" parameter, this probe would
> result in all the VFs being bound to the PF host (and thus unavailable for
> guests).

As I said, you can unbind it through sysfs.

> The small section of code which makes use of the probe_vf parameter
> (file net/ethernet/mellanox/mlx4_main.c):

Yes, I get it.

> 	/* Detect if this device is a virtual function */
> 	if (id && id->driver_data & MLX4_VF) {
> 		/* When acting as pf, we normally skip vfs unless explicitly
> 		 * requested to probe them. */
> 		if (sr_iov && extended_func_num(pdev) > probe_vf) {
> 			mlx4_warn(dev, "Skipping virtual function:%d\n",
> 						extended_func_num(pdev));
> 			err = -ENODEV;
> 			goto err_free_dev;
> 		}
> 
> If you invoke "dmesg" on the PF host, you will see a series of the
> "Skipping... " messages, one per VF.  If probe_vf > 0, the PF-host will
> reserve some VFs for its own use, and not issue the "Skipping..." message
> for those VFs.

What if you want to change that later?  You can't use those VFs in the
PF-host without reloading the driver.

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.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2011-12-06 17:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 10:19 [PATCH net-next V0 19/21] mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet Yevgeny Petrilin
     [not found] ` <4ED8A636.40901-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2011-12-02 17:51   ` Roland Dreier
     [not found]     ` <CAL1RGDV8LzSOei=aQW7VXUP=G+9qdO+Y4eKZu8mBuHJuUp8UuQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-04 14:29       ` Jack Morgenstein
     [not found]         ` <201112041629.41466.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-12-04 15:39           ` Or Gerlitz
     [not found]             ` <4EDB942F.1020101-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2011-12-05  7:19               ` Jack Morgenstein
     [not found]                 ` <201112050919.39280.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-12-05  7:40                   ` Or Gerlitz
2011-12-05 19:01           ` Roland Dreier
2011-12-05 21:26   ` Ben Hutchings
2011-12-06  8:09     ` Yevgeny Petrilin
2011-12-06  8:35     ` Jack Morgenstein
     [not found]       ` <201112061035.54093.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-12-06 17:41         ` Ben Hutchings [this message]

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=1323193300.2772.5.camel@bwh-desktop \
    --to=bhutchings-s/n/euqhgbpzrors9yw3xa@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=liranl-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).