ghw icon indicating copy to clipboard operation
ghw copied to clipboard

Grab information on VFs for SR-IOV PFs

Open jaypipes opened this issue 7 years ago • 5 comments

It's possible to retrieve the number of virtual functions (VFs) on an SR-IOV physical function (PF) on Linux by querying the following pseudo-files:

  • /sys/class/net/$NIC_NAME/device/sriov_numvfs: The number of active VFs for the PF
  • /sys/class/net/$NIC_NAME/device/sriov_totalvfs: The maximum number of VFs the PF can accomodate

jaypipes avatar Nov 19 '18 21:11 jaypipes

Since I don't have any machines with SR-IOV enabled NICs, I'm probably going to need to get #66 going in order to "test" this functionality

jaypipes avatar Nov 19 '18 21:11 jaypipes

Hi there, I can contribute here, depending on the decision we take in https://github.com/jaypipes/ghw/issues/66 (and also https://github.com/jaypipes/ghw/issues/201 :) )

ffromani avatar Dec 03 '20 08:12 ffromani

I have access to boxes with low and high end SRIOV cards and I can provide snapshots (albeit most likely for low-end cards only) to enable others.

ffromani avatar Jan 12 '21 07:01 ffromani

I have access to boxes with low and high end SRIOV cards and I can provide snapshots (albeit most likely for low-end cards only) to enable others.

That is awesome news, @fromanirh! Would be great to get contributions from you in this area!

jaypipes avatar Jan 12 '21 23:01 jaypipes

first draft, RFC for API: https://github.com/jaypipes/ghw/pull/230

ffromani avatar Feb 24 '21 11:02 ffromani