mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
8021Qbh: use preassociate-rr during the migration prepare stage
This patch introduces PREASSOCIATE-RR during incoming VM migration on the destination host. This is similar to the usage of PREASSOCIATE during migration in 8021qbg libvirt code today. PREASSOCIATE-RR is a VDP operation. With the latest at IEEE, 8021qbh will need to support VDP operations. A corresponding enic driver patch to support PREASSOCIATE-RR for 8021qbh will be posted for net-next-2.6 inclusion soon.
This commit is contained in:
parent
c59176c109
commit
7708da38c7
@ -87,6 +87,7 @@ enum virVirtualPortOp {
|
|||||||
ASSOCIATE = 0x1,
|
ASSOCIATE = 0x1,
|
||||||
DISASSOCIATE = 0x2,
|
DISASSOCIATE = 0x2,
|
||||||
PREASSOCIATE = 0x3,
|
PREASSOCIATE = 0x3,
|
||||||
|
PREASSOCIATE_RR = 0x4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1452,6 +1453,7 @@ doPortProfileOp8021Qbh(const char *ifname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (virtPortOp) {
|
switch (virtPortOp) {
|
||||||
|
case PREASSOCIATE_RR:
|
||||||
case ASSOCIATE:
|
case ASSOCIATE:
|
||||||
rc = virGetHostUUID(hostuuid);
|
rc = virGetHostUUID(hostuuid);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -1465,7 +1467,9 @@ doPortProfileOp8021Qbh(const char *ifname,
|
|||||||
vm_uuid,
|
vm_uuid,
|
||||||
hostuuid,
|
hostuuid,
|
||||||
vf,
|
vf,
|
||||||
PORT_REQUEST_ASSOCIATE);
|
(virtPortOp == PREASSOCIATE_RR) ?
|
||||||
|
PORT_REQUEST_PREASSOCIATE_RR
|
||||||
|
: PORT_REQUEST_ASSOCIATE);
|
||||||
if (rc == -ETIMEDOUT)
|
if (rc == -ETIMEDOUT)
|
||||||
/* Association timed out, disassociate */
|
/* Association timed out, disassociate */
|
||||||
doPortProfileOpCommon(nltarget_kernel, NULL, ifindex,
|
doPortProfileOpCommon(nltarget_kernel, NULL, ifindex,
|
||||||
@ -1553,10 +1557,11 @@ vpAssociatePortProfileId(const char *macvtap_ifname,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_VIRTUALPORT_8021QBH:
|
case VIR_VIRTUALPORT_8021QBH:
|
||||||
/* avoid associating twice */
|
rc = doPortProfileOp8021Qbh(linkdev, macvtap_macaddr,
|
||||||
if (vmOp != VIR_VM_OP_MIGRATE_IN_FINISH)
|
virtPort, vmuuid,
|
||||||
rc = doPortProfileOp8021Qbh(linkdev, macvtap_macaddr,
|
(vmOp == VIR_VM_OP_MIGRATE_IN_START)
|
||||||
virtPort, vmuuid, ASSOCIATE);
|
? PREASSOCIATE_RR
|
||||||
|
: ASSOCIATE);
|
||||||
if (vmOp != VIR_VM_OP_MIGRATE_IN_START && !rc)
|
if (vmOp != VIR_VM_OP_MIGRATE_IN_START && !rc)
|
||||||
ifaceUp(linkdev);
|
ifaceUp(linkdev);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user