Re: Number of the max supported VFs are different

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/3/22 03:55, Yalan Zhang wrote:
> Hi there,
> 
> I have an Intel X520 network card, and I find the max supported VFs are
> different.
> Please check below outputs:
> 
> # lspci -vvv -s 04:00.0
> 04:00.0 Ethernet controller: Intel Corporation Ethernet 10G 2P X520
> Adapter (rev 01)
> ...
>  Capabilities: [160 v1] Single Root I/O Virtualization (SR-IOV)
> IOVCap: Migration-, Interrupt Message Number: 000
> IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+
> IOVSta: Migration-
> ** Initial VFs: 64, Total VFs: 64**, Number of VFs: 0, Function
> Dependency Link: 00
> VF offset: 128, stride: 2, Device ID: 10ed
> Supported Page Size: 00000553, System Page Size: 00000001
> Region 0: Memory at 0000000094400000 (64-bit, prefetchable)
> Region 3: Memory at 0000000094500000 (64-bit, prefetchable)
> VF Migration: offset: 00000000, BIR: 0
> Kernel driver in use: ixgbe
> Kernel modules: ixgbe
> 
> # cat /sys/class/net/enp4s0f0/device/sriov_totalvfs
> 63
> 
> # echo 64 > /sys/class/net/enp4s0f0/device/sriov_numvfs
> -bash: echo: write error: Numerical result out of range
> # echo 63 > /sys/class/net/enp4s0f0/device/sriov_numvfs
> # cat /sys/class/net/enp4s0f0/device/sriov_numvfs
> 63
> 
> The lspci command says the Total VFs supported is 64, while in the file
> "sriov_totalvfs"  says it's 63.
> And the sriov_numvfs file will take precedence.
> Why are the numbers different?  Just a little curious.

I believe this comes from the driver implementation:

/*  ixgbe driver limit the max number of VFs could be enabled to
 *  63 (IXGBE_MAX_VF_FUNCTIONS - 1)
 */
#define IXGBE_MAX_VFS_DRV_LIMIT  (IXGBE_MAX_VF_FUNCTIONS - 1)

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h#n7

Michal




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux