[libvirt] [PATCH 3/5 v3] Adding the element pf to network xml.
Eric Blake
eblake at redhat.com
Tue Jan 10 23:33:59 UTC 2012
On 12/14/2011 03:50 AM, Shradha Shah wrote:
> This element will help the user to just specify the SR-IOV physical
> function in order to access all the Virtual functions attached to it.
> ---
> docs/schemas/network.rng | 7 ++++
> src/conf/network_conf.c | 69 +++++++++++++++++++++++++++++++++++++++++++--
> src/conf/network_conf.h | 3 ++
> 3 files changed, 75 insertions(+), 4 deletions(-)
In addition to Daniel's comments,
> @@ -965,10 +971,52 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
>
> /* all of these modes can use a pool of physical interfaces */
> nForwardIfs = virXPathNodeSet("./interface", ctxt, &forwardIfNodes);
> - if (nForwardIfs < 0)
> + if (nForwardIfs <= 0) {
> + virNetworkReportError(VIR_ERR_XML_ERROR,
> + _("No interface pool given, checking for SRIOV pf"));
> + nForwardPfs = virXPathNodeSet("./pf", ctxt, &forwardPfNodes);
> +
> + if (nForwardPfs <= 0) {
> + virNetworkReportError(VIR_ERR_XML_ERROR,
> + _("No interface pool or SRIOV physical device given"));
This has to be a check for '< 0', not '<= 0', or else you get LOTS of
'make check' failures.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120110/54b8a776/attachment-0001.sig>
More information about the libvir-list
mailing list