* Virtual functions numbering (SRIOV) - why odd numbers are not used ?
@ 2017-01-28 11:28 Kevin Wilson
2017-01-28 15:05 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wilson @ 2017-01-28 11:28 UTC (permalink / raw)
To: linux-pci
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 ?
Regards,
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Virtual functions numbering (SRIOV) - why odd numbers are not used ?
2017-01-28 11:28 Virtual functions numbering (SRIOV) - why odd numbers are not used ? Kevin Wilson
@ 2017-01-28 15:05 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2017-01-28 15:05 UTC (permalink / raw)
To: Kevin Wilson; +Cc: linux-pci
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-28 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).