Currently we do not validate ports prior a VM being started. This patch
allows ports to be validated during creation.

Validation ports have the same lifecycle as an operational port so allow
them to have the same treatment as an operational port.

Beside the above this also allows us to add OVS ports prior the VM to being
started.

Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>
---
 datapath-windows/ovsext/Oid.c   | 8 --------
 datapath-windows/ovsext/Vport.c | 4 ----
 2 files changed, 12 deletions(-)

diff --git a/datapath-windows/ovsext/Oid.c b/datapath-windows/ovsext/Oid.c
index 7c7ffe7..d5ba821 100644
--- a/datapath-windows/ovsext/Oid.c
+++ b/datapath-windows/ovsext/Oid.c
@@ -159,14 +159,6 @@ OvsProcessSetOidPort(POVS_SWITCH_CONTEXT switchObject,
         goto done;
     }
 
-    if (portParam->IsValidationPort) {
-        /* Validation ports are used internally by the Hyper-V switch
-         * to validate and verify settings. We must skip handling them,
-         * and return STATUS_SUCCESS as the OID result
-         */
-        return NDIS_STATUS_SUCCESS;
-    }
-
     switch(setInfo->Oid) {
     case OID_SWITCH_PORT_CREATE:
         status = HvCreatePort(switchObject, portParam, 0);
diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index 1462453..294fd7f 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
@@ -1451,10 +1451,6 @@ OvsAddConfiguredSwitchPorts(POVS_SWITCH_CONTEXT 
switchContext)
     for (arrIndex = 0; arrIndex < portArray->NumElements; arrIndex++) {
          portParam = NDIS_SWITCH_PORT_AT_ARRAY_INDEX(portArray, arrIndex);
 
-         if (portParam->IsValidationPort) {
-             continue;
-         }
-
          status = HvCreatePort(switchContext, portParam, 0);
          if (status != STATUS_SUCCESS && status != STATUS_DATA_NOT_ACCEPTED) {
              break;
-- 
1.9.5.msysgit.0
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to