Validation:
- With these fixes, we no longer see the freeze during module
uninstallation or when we try to add a new port.
- We are able to add a port called "internal of type internal using:
ovs-dpctl.exe add-if ovs-system internal,type=internal
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
/* 'portFriendlyName' is not NUL-terminated. */
SIZE_T length = strlen(name);
SIZE_T wstrSize = length * sizeof(WCHAR);
/* 'portFriendlyName' is not NUL-terminated. */
SIZE_T length = strlen(name);
SIZE_T wstrSize = length * sizeof(WCHAR);
PWSTR wsName = OvsAllocateMemory(wstrSize);
if (!wsName) {
return NULL;
}
PWSTR wsName = OvsAllocateMemory(wstrSize);
if (!wsName) {
return NULL;
}
- for (UINT i = 0; i < length; i) {
+ for (i = 0; i < length; i++) {
- for (UINT32 i = 0; i < OVS_MAX_VPORT_ARRAY_SIZE; i) {
+ for (i = 0; i < OVS_MAX_VPORT_ARRAY_SIZE; i++) {
head = &(switchContext->portIdHashArray[i]);
LIST_FORALL(head, link) {
vport = CONTAINING_RECORD(link, OVS_VPORT_ENTRY, portIdLink);
head = &(switchContext->portIdHashArray[i]);
LIST_FORALL(head, link) {
vport = CONTAINING_RECORD(link, OVS_VPORT_ENTRY, portIdLink);
VOID
OvsClearAllSwitchVports(POVS_SWITCH_CONTEXT switchContext)
{
VOID
OvsClearAllSwitchVports(POVS_SWITCH_CONTEXT switchContext)
{
- for (UINT hash = 0; hash < OVS_MAX_VPORT_ARRAY_SIZE; hash) {
+ for (UINT hash = 0; hash < OVS_MAX_VPORT_ARRAY_SIZE; hash++) {
PLIST_ENTRY head, link, next;
head = &(switchContext->portIdHashArray[hash & OVS_VPORT_MASK]);
PLIST_ENTRY head, link, next;
head = &(switchContext->portIdHashArray[hash & OVS_VPORT_MASK]);