+ switch (vport->ovsType) {
+ case OVS_VPORT_TYPE_INTERNAL:
+ if (!vport->isBridgeInternal) {
+ if (hvDelete && vport->isPresentOnHv == FALSE) {
+ switchContext->internalPortId = 0;
+ switchContext->internalVport = NULL;
+ OvsInternalAdapterDown();
+ }
+ hvSwitchPort = TRUE;
+ }
+ break;
+ case OVS_VPORT_TYPE_VXLAN:
+ {
+ NTSTATUS status;
+ status = OvsRemoveTunnelVport(usrParamsCtx, switchContext, vport,
+ hvDelete, ovsDelete);
+ if (status != STATUS_SUCCESS) {
+ return status;
+ }
+ }
+ case OVS_VPORT_TYPE_STT:
+ OvsCleanupSttTunnel(vport);
+ break;
+ case OVS_VPORT_TYPE_GRE:
+ case OVS_VPORT_TYPE_GRE64:
+ break;
+ case OVS_VPORT_TYPE_NETDEV:
+ if (vport->isExternal) {
+ if (vport->nicIndex == 0) {
+ /* Such a vport is not part of any of the hash tables, since it
+ * is not exposed to userspace. See Vport.h for explanation. */
+ ASSERT(hvDelete == TRUE);
+ ASSERT(switchContext->numPhysicalNics == 0);
+ switchContext->virtualExternalPortId = 0;
+ switchContext->virtualExternalVport = NULL;
+ OvsFreeMemoryWithTag(vport, OVS_VPORT_POOL_TAG);
+ return STATUS_SUCCESS;
+ }
+ }
+ hvSwitchPort = TRUE;
+ default:
+ break;
+ }
+