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

Re: [libvirt] [PATCH 06/15] Forward Mode 'Hostdev' qemu driver implementation



On 08/15/2012 06:43 AM, Shradha Shah wrote:
> On 08/14/2012 07:44 AM, Laine Stump wrote:
>> On 08/10/2012 12:24 PM, Shradha Shah wrote:
>>> +                                                 (def->nhostdevs-1)) < 0) {
>>> +                    virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
>>> +                                    _("Could not assign alias to Net Hostdev"));
>>> +                    goto error;
>>> +                }
>>> +                
>>> +                if (virDomainHostdevFind(def,
>>> +                                         hostdev,
>>> +                                         &found) < 0) {
>>
>> If the device is found already on the list, you should log an error and
>> fail.
> The device will be found on the list when using interface type=hostdev.
> If I log an error and fail wouldn't that mean that interface type=hostdev will always fail
> at this point?

Right. Good point. I guess it's only an error if net->type ==
VIR_DOMAIN_NET_TYPE_NETWORK.

Actually, if (actualType == VIR_DOMAIN_NET_TYPE_HOSTDEV) && (net->type
!= VIR_DOMAIN_NET_TYPE_NETWORK), then you don't need to do *any* of that
code (except "continue;"). Once you've done that, a successful return
from virDomainHostdevFind *is* an error (because it means some other
device in the domain is trying to use the same physical device).

BTW, I've pushed all of my openvswitch/virtualport/vlan patches which
will have conflicts with your patches in src/network/bridge_driver.c. If
resolving the conflicts is problematic, let me know and I'll try to help out


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