[libvirt] [PATCH 02/15] Moved the code to create implicit interface pool from PF to a new function
Laine Stump
laine at laine.org
Tue Aug 14 05:49:13 UTC 2012
On 08/10/2012 12:23 PM, Shradha Shah wrote:
> Just code movement no functional changes here. This makes the code reusable
BTW - again for this patch, make the title line much shorter, e.g:
network: helper function to create interface pool from PF
Existing code that creates a list of forwardIfs from a single PF
was moved to the new utility function networkCreateInterfacePool.
No functional change.
> @@ -2894,36 +2942,11 @@ networkAllocateActualDevice(virDomainNetDefPtr iface)
> */
> if (netdef->forwardType == VIR_NETWORK_FORWARD_PASSTHROUGH) {
> if ((netdef->nForwardPfs > 0) && (netdef->nForwardIfs <= 0)) {
> - if ((virNetDevGetVirtualFunctions(netdef->forwardPfs->dev,
> - &vfname, &num_virt_fns)) < 0) {
> - virReportError(VIR_ERR_INTERNAL_ERROR,
> - _("Could not get Virtual functions on %s"),
> - netdef->forwardPfs->dev);
> + if ((networkCreateInterfacePool(netdef)) < 0) {
> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> + _("Could not Interface Pool"));
I just noticed - networkCreateInterfacePool() logs its own, more
specific error. If you log an error here, it will overwrite the better
error. So don't.
More information about the libvir-list
mailing list