if (nicParam->NicType == NdisSwitchNicTypeExternal &&
nicParam->NicIndex != 0) {
POVS_VPORT_ENTRY virtVport =
- (POVS_VPORT_ENTRY)switchContext->externalVport;
+ (POVS_VPORT_ENTRY)switchContext->virtualExternalVport;
vport = (POVS_VPORT_ENTRY)OvsAllocateVport();
if (vport == NULL) {
status = NDIS_STATUS_RESOURCES;
NDIS_SWITCH_PORT_ID portId,
NDIS_SWITCH_NIC_INDEX index)
{
- if (portId == switchContext->externalPortId) {
- return (POVS_VPORT_ENTRY)switchContext->externalVport;
+ if (portId == switchContext->virtualExternalPortId) {
+ return (POVS_VPORT_ENTRY)switchContext->virtualExternalVport;
} else if (switchContext->internalPortId == portId) {
return (POVS_VPORT_ENTRY)switchContext->internalVport;
} else {
switch (vport->portType) {
case NdisSwitchPortTypeExternal:
if (vport->nicIndex == 0) {
- switchContext->externalPortId = vport->portId;
- switchContext->externalVport = vport;
+ switchContext->virtualExternalPortId = vport->portId;
+ switchContext->virtualExternalVport = vport;
RtlStringCbPrintfA(vport->ovsName, OVS_MAX_PORT_NAME_LENGTH - 1,
"external.virtualAdapter");
} else {
hash = OvsJhashWords(&vport->portId, 1, OVS_HASH_BASIS);
InsertHeadList(&switchContext->portIdHashArray[hash & OVS_VPORT_MASK],
&vport->portIdLink);
- switchContext->numVports++;
+ switchContext->numHvVports++;
return NDIS_STATUS_SUCCESS;
}
if (vport->isExternal) {
if (vport->nicIndex == 0) {
ASSERT(switchContext->numPhysicalNics == 0);
- switchContext->externalPortId = 0;
- switchContext->externalVport = NULL;
+ switchContext->virtualExternalPortId = 0;
+ switchContext->virtualExternalVport = NULL;
OvsFreeMemory(vport);
return;
} else {
RemoveEntryList(&vport->ovsNameLink);
RemoveEntryList(&vport->portIdLink);
RemoveEntryList(&vport->portNoLink);
- switchContext->numVports--;
+ switchContext->numHvVports--;
OvsFreeMemory(vport);
}
if (nicParam->NicType == NdisSwitchNicTypeExternal &&
nicParam->NicIndex != 0) {
POVS_VPORT_ENTRY virtVport =
- (POVS_VPORT_ENTRY)switchContext->externalVport;
+ (POVS_VPORT_ENTRY)switchContext->virtualExternalVport;
vport = OvsAllocateVport();
if (vport) {
OvsInitPhysNicVport(vport, virtVport, nicParam->NicIndex);
}
}
- if (switchContext->externalVport) {
+ if (switchContext->virtualExternalVport) {
OvsRemoveAndDeleteVport(switchContext,
- (POVS_VPORT_ENTRY)switchContext->externalVport);
+ (POVS_VPORT_ENTRY)switchContext->virtualExternalVport);
}
}