Re: [libvirt] [PATCH] network: don't even call networkRunHook if there is no network

2014-02-26 Thread Michal Privoznik
On 25.02.2014 16:46, Laine Stump wrote: networkAllocateActualDevice() is called for *all* interfaces, not just those with type='network'. In that case, it will jump down to its validate: label immediately, without allocating anything. After validation is done, two counters are potentially

Re: [libvirt] [PATCH] network: don't even call networkRunHook if there is no network

2014-02-26 Thread Laine Stump
On 02/26/2014 12:42 PM, Michal Privoznik wrote: On 25.02.2014 16:46, Laine Stump wrote: [...] This patch refactors that code a slight bit so that networkRunHook() doesn't get called if netdef is NULL (i.e. type != network) and to place the conditional increment of dev-connections inside the

[libvirt] [PATCH] network: don't even call networkRunHook if there is no network

2014-02-25 Thread Laine Stump
networkAllocateActualDevice() is called for *all* interfaces, not just those with type='network'. In that case, it will jump down to its validate: label immediately, without allocating anything. After validation is done, two counters are potentially updated (one for the network, and one for any

Re: [libvirt] [PATCH] network: don't even call networkRunHook if there is no network

2014-02-25 Thread Eric Blake
On 02/25/2014 08:46 AM, Laine Stump wrote: networkAllocateActualDevice() is called for *all* interfaces, not just those with type='network'. In that case, it will jump down to its validate: label immediately, without allocating anything. After validation is done, two counters are potentially