2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00

datapath-windows: We don't need to keep validation ports in ovs

Validation ports are used internally by the hyper-v switch to validate
and verify settings for the real hyper-v switch ports that will be
connected to the VNic. The validation ports are of no use to us - we
must skip handling them, and return STATUS_SUCCESS as the OID result.

Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Co-authored-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Tested-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Alin Serdean
2014-10-09 17:46:55 +00:00
committed by Ben Pfaff
parent fa0483234c
commit c99e65005e
3 changed files with 13 additions and 4 deletions

View File

@@ -159,6 +159,14 @@ 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);

View File

@@ -609,7 +609,6 @@ static VOID
OvsInitVportWithPortParam(POVS_VPORT_ENTRY vport,
PNDIS_SWITCH_PORT_PARAMETERS portParam)
{
vport->isValidationPort = portParam->IsValidationPort;
vport->portType = portParam->PortType;
vport->portState = portParam->PortState;
vport->portId = portParam->PortId;
@@ -698,7 +697,6 @@ OvsInitPhysNicVport(POVS_VPORT_ENTRY vport,
POVS_VPORT_ENTRY virtVport,
UINT32 nicIndex)
{
vport->isValidationPort = virtVport->isValidationPort;
vport->portType = virtVport->portType;
vport->portState = virtVport->portState;
vport->portId = virtVport->portId;
@@ -838,6 +836,11 @@ 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;
}
vport = (POVS_VPORT_ENTRY)OvsAllocateVport();
if (vport == NULL) {
status = NDIS_STATUS_RESOURCES;
@@ -954,7 +957,6 @@ OvsInitTunnelVport(POVS_VPORT_ENTRY vport,
size_t len;
NTSTATUS status = STATUS_SUCCESS;
vport->isValidationPort = FALSE;
vport->ovsType = addReq->type;
vport->ovsState = OVS_STATE_PORT_CREATED;
RtlCopyMemory(vport->ovsName, addReq->name, OVS_MAX_PORT_NAME_LENGTH);

View File

@@ -82,7 +82,6 @@ typedef struct _OVS_VPORT_ENTRY {
NDIS_SWITCH_PORT_STATE portState;
NDIS_SWITCH_NIC_STATE nicState;
NDIS_SWITCH_PORT_TYPE portType;
BOOLEAN isValidationPort;
UINT8 permMacAddress[MAC_ADDRESS_LEN];
UINT8 currMacAddress[MAC_ADDRESS_LEN];