linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Kevin Wilson <wkevils@gmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: Virtual functions numbering (SRIOV) - why odd numbers are not used ?
Date: Sat, 28 Jan 2017 08:05:10 -0700	[thread overview]
Message-ID: <20170128080510.436f0cb7@t450s.home> (raw)
In-Reply-To: <CAGXs5wVy0CPQB_NCsM+sSny4wj61p-gRAsTVbdSi_6drmz6TGg@mail.gmail.com>

On Sat, 28 Jan 2017 13:28:25 +0200
Kevin Wilson <wkevils@gmail.com> wrote:

> Hello,
> I had noticed that whenever I create virtual function on Nic devices,
> the numbering scheme is the same:
> the the last digit of first VF is .0, of the second one is .2, the
> third is .4, and so on; and no odd number are used.
> 
> For example, with Intel IXGBE nic, we have:
> 
> 
> echo 4 > /sys/bus/pci/devices/0000:06:00.0/sriov_numvfs
> 
> lspci | grep "Virtual Function"
> 06:10.0 Ethernet controller: Intel Corporation 82599 Ethernet
> Controller Virtual Function (rev 01)
> 06:10.2 Ethernet controller: Intel Corporation 82599 Ethernet
> Controller Virtual Function (rev 01)
> 06:10.4 Ethernet controller: Intel Corporation 82599 Ethernet
> Controller Virtual Function (rev 01)
> 06:10.6 Ethernet controller: Intel Corporation 82599 Ethernet
> Controller Virtual Function (rev 01)
> 
> Does anybody know what is the reason that odd numbers are not used ?
> are they kept for something else ?
> For example, why don't we get : 06:10.0,06:10.1,06:10.2,06:10.3 in this case ?

The SR-IOV capability defines the offset and stride for VFs.  On Intel
devices the stride is typically 2, so you get this even number VF
layout, but only on the even numbered PF.  The odd numbered PF
typically fills in the gaps, creating only odd numbered VFs.  In any
case, it's the card vendor that defines the VF layout via the SR-IOV
capability parameters.  Thanks,

Alex

      reply	other threads:[~2017-01-28 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-28 11:28 Virtual functions numbering (SRIOV) - why odd numbers are not used ? Kevin Wilson
2017-01-28 15:05 ` Alex Williamson [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=20170128080510.436f0cb7@t450s.home \
    --to=alex.williamson@redhat.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=wkevils@gmail.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 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).