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

Re: [libvirt] [PATCH 3/5 v3] Adding the element pf to network xml.



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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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