Acked-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>
-----Mesaj original----- De la: dev [mailto:dev-boun...@openvswitch.org] În numele Nithin Raju Trimis: Monday, October 13, 2014 6:56 AM Către: dev@openvswitch.org Subiect: [ovs-dev] [PATCH 6/6] datapath-windows: loop iterator fixes in Vport.c 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 <nit...@vmware.com> --- datapath-windows/ovsext/Vport.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c index 9dfbf51..0522cfd 100644 --- a/datapath-windows/ovsext/Vport.c +++ b/datapath-windows/ovsext/Vport.c @@ -512,16 +512,17 @@ OvsFindVportByHvName(POVS_SWITCH_CONTEXT switchContext, /* 'portFriendlyName' is not NUL-terminated. */ SIZE_T length = strlen(name); SIZE_T wstrSize = length * sizeof(WCHAR); + UINT i; PWSTR wsName = OvsAllocateMemory(wstrSize); if (!wsName) { return NULL; } - for (UINT i = 0; i < length; i) { + for (i = 0; i < length; i++) { wsName[i] = name[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); @@ -912,7 +913,7 @@ cleanup: 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]); -- 1.7.4.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev