On Mon, Nov 23, 2015 at 04:50:13PM -0500, Laine Stump wrote:
Report the maximum possible number of VFs for an SRIOV PF, like
this:
<capability type='virtual_functions' maxCount='7'>
...
</capability>
I've just discovered that the virtual_functions and physical_functions
capabilities are not supported in the virNodeDeviceParse functions,
only in virNodeDeviceFormat (I suppose because they are only reported,
not set from XML). This should probably be remedied, but is less
immediately useful than the current patch.
---
docs/formatnode.html.in | 11 ++++++++++-
src/conf/node_device_conf.c | 32 ++++++++++++++++++++------------
src/conf/node_device_conf.h | 1 +
3 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in
index ed00af5..79e2448 100644
--- a/docs/formatnode.html.in
+++ b/docs/formatnode.html.in
@@ -108,7 +108,16 @@
the type is <code>virtual_functions</code>, then this
device is an SRIOV PF, and the capability element will
have a list of <code>address</code> subelements, one
- for each VF on this PF.
+ for each VF on this PF. If the host system supports
+ reporting it (via the "sriov_maxvfs" file in the
+ device's sysfs directory) the capability element will
+ also have an attribute named <code>maxCount</code>
+ which is the maximum number of SRIOV VFs supported by
+ this device, which could be higher than the number of
+ VFs that are curently active <span class="since">since
+ 1.2.22</span>; in this case, even if there are
The new version will be 1.3.0
+ currently no active VFs the virtual_functions
+ capabililty will still be shown.
</dd>
<dt><code>numa</code></dt>
<dd>
[...]
ACK with that change.
Pavel