kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: bjorn@mork.no (Bjørn Mork)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Question about ixgbe and ixgbevf
Date: Mon, 23 Mar 2015 10:56:45 +0100	[thread overview]
Message-ID: <878ueoca02.fsf@nemi.mork.no> (raw)
In-Reply-To: <CAGXs5wWbvJX5_JKB6uedOD=WTdeeiJjuZhwohrS2iv=iC1pC9g@mail.gmail.com> (Kevin Wilson's message of "Mon, 23 Mar 2015 07:45:15 +0200")

Kevin Wilson <wkevils@gmail.com> writes:

> Hi,
> I have an x86_64 machine (F21) on which ixgbevf is not loaded.
> I notices that when running
> modprobe ixgbevf max_vfs = 10 (or any other number), this triggers
> loading of ixgbevf driver.
> I will appreciate if someone can exaplain the implementation details
> of how does this happen.
> I could not find what in the ixgbe driver code triggers this action


max_vfs is a deprecated method for setting an initial value for
adapter->num_vfs.  You'll normally use sysfs to add VFs today.


If you look at this extremely over-long ixgbe_probe() function in
ixgbe_main.c then you'll find this:

	pci_sriov_set_totalvfs(pdev, IXGBE_MAX_VFS_DRV_LIMIT);
	ixgbe_enable_sriov(adapter);


... and then looking at ixgbe_enable_sriov() in ixgbe_sriov.c :

		err = pci_enable_sriov(adapter->pdev, adapter->num_vfs);


If you're interested in the gory details here, then I suggest looking at
Documentation/PCI/pci-iov-howto.txt . But it is sufficient to know that
this creates a number of new PCI devices with IDs which is then matched
by the ixgbevf driver.  That driver will then be autoloaded and probed
for all the new VF PCI devices, just like any other hotplugged PCI
device works.



Bj?rn

      parent reply	other threads:[~2015-03-23  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23  5:45 Question about ixgbe and ixgbevf Kevin Wilson
2015-03-23  9:21 ` Biju Abraham
2015-03-23  9:56 ` Bjørn Mork [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=878ueoca02.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=kernelnewbies@lists.kernelnewbies.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).