switchContext->vportArray =
(PVOID *)OvsAllocateMemory(sizeof (PVOID) * OVS_MAX_VPORT_ARRAY_SIZE);
- switchContext->nameHashArray = (PLIST_ENTRY)
+ switchContext->ovsPortNameHashArray = (PLIST_ENTRY)
OvsAllocateMemory(sizeof (LIST_ENTRY) * OVS_MAX_VPORT_ARRAY_SIZE);
switchContext->portHashArray = (PLIST_ENTRY)
OvsAllocateMemory(sizeof (LIST_ENTRY) * OVS_MAX_VPORT_ARRAY_SIZE);
if (status != NDIS_STATUS_SUCCESS ||
switchContext->dispatchLock == NULL ||
switchContext->vportArray == NULL ||
- switchContext->nameHashArray == NULL ||
+ switchContext->ovsPortNameHashArray == NULL ||
switchContext->portHashArray == NULL) {
if (switchContext->dispatchLock) {
NdisFreeRWLock(switchContext->dispatchLock);
if (switchContext->vportArray) {
OvsFreeMemory(switchContext->vportArray);
}
- if (switchContext->nameHashArray) {
- OvsFreeMemory(switchContext->nameHashArray);
+ if (switchContext->ovsPortNameHashArray) {
+ OvsFreeMemory(switchContext->ovsPortNameHashArray);
}
if (switchContext->portHashArray) {
OvsFreeMemory(switchContext->portHashArray);
}
for (i = 0; i < OVS_MAX_VPORT_ARRAY_SIZE; i++) {
- InitializeListHead(&switchContext->nameHashArray[i]);
+ InitializeListHead(&switchContext->ovsPortNameHashArray[i]);
}
for (i = 0; i < OVS_MAX_VPORT_ARRAY_SIZE; i++) {
InitializeListHead(&switchContext->portHashArray[i]);
ASSERT(switchContext->numVports == 0);
NdisFreeRWLock(switchContext->dispatchLock);
- OvsFreeMemory(switchContext->nameHashArray);
+ OvsFreeMemory(switchContext->ovsPortNameHashArray);
OvsFreeMemory(switchContext->portHashArray);
OvsFreeMemory(switchContext->vportArray);
OvsDeleteFlowTable(&switchContext->datapath);
POVS_VPORT_ENTRY vport;
PLIST_ENTRY head, link;
UINT32 hash = OvsJhashBytes((const VOID *)name, length, OVS_HASH_BASIS);
- head = &(switchContext->nameHashArray[hash & OVS_VPORT_MASK]);
+ head = &(switchContext->ovsPortNameHashArray[hash & OVS_VPORT_MASK]);
LIST_FORALL(head, link) {
- vport = CONTAINING_RECORD(link, OVS_VPORT_ENTRY, nameLink);
+ vport = CONTAINING_RECORD(link, OVS_VPORT_ENTRY, ovsNameLink);
if (vport->ovsNameLen == length &&
RtlEqualMemory(name, vport->ovsName, length)) {
return vport;
return NDIS_STATUS_SUCCESS;
}
hash = OvsJhashBytes(vport->ovsName, vport->ovsNameLen, OVS_HASH_BASIS);
- InsertHeadList(&switchContext->nameHashArray[hash & OVS_VPORT_MASK],
- &vport->nameLink);
+ InsertHeadList(&switchContext->ovsPortNameHashArray[hash & OVS_VPORT_MASK],
+ &vport->ovsNameLink);
hash = OvsJhashWords(&vport->portId, 1, OVS_HASH_BASIS);
InsertHeadList(&switchContext->portHashArray[hash & OVS_VPORT_MASK],
- &vport->portLink);
+ &vport->portLink);
switchContext->numVports++;
return NDIS_STATUS_SUCCESS;
}
break;
}
- RemoveEntryList(&vport->nameLink);
+ RemoveEntryList(&vport->ovsNameLink);
RemoveEntryList(&vport->portLink);
gen = (gen + 1) & 0xff;
switchContext->vportArray[OVS_VPORT_INDEX(vport->portNo)] =